Hi people!

I have created a class that contains a single DateTime property, called Date.

Like this

Code:
class MyDate
{
	private DateTime _date;

	public MyDate(DateTime defaultValue)
	{
		_date = defaultValue;
	}

	public DateTime Date
	{
		get{return _date;}
		set{_date = value;}
	}
}
I have also created another class that has an Instance of MyDate stored inside

Code:
public class MyOtherClass
{
	private MyDate _myDate;
	
	public MyOtherClass
	{
		_myDate = new MyDate(DateTime.Now);
	}

	public MyDate MyDate
	{
		get{return _myDate;}
		set{_myDate = value;}
	}
}
Its all quite simple... What i want to do is bind the property MyDate in the MyOtherClass to the Text property of a TextBox

Code:
this.TextBox1.DataBindings.Add("Text",anInstanceOfMyOtherObject,"MyDate")
This is fine, when the code executes the ToString method of MyDate is called and the current date is displayed... Oh... the ToString method is not shown above...

Now when i change the value in the text box i want to update the value in anInstanceOfMyOtherObject.MyDate.Date

I have tried writting implicit conversions for converting string to MyDate objects but this isn't working. Any suggestions?

Thanks Rohan