VB.Net syntax.
-
what's the vb.Net counterpart of the following blocks in Csharp?
public class NullableDateTimePicker : System.Windows.Forms.DateTimePicker
{
// Default Constructor
public NullableDateTimePicker() : base()
{
base.Format = DateTimePickerFormat.Custom;
NullValue = " ";
Format = DateTimePickerFormat.Custom;
CustomFormat = "dd MMM yyyy";this.DataBindings.CollectionChanged += new CollectionChangeEventHandler(DataBindings\_CollectionChanged); }
}
//NullableDateTimePicker is the class from which DateTimePickerEditingControl class inherits.
//IDataGridViewEditingControl is the interface which DateTimePickerEditingControl class implements.
class DateTimePickerEditingControl : NullableDateTimePicker, IDataGridViewEditingControl
{
//Constructor
public DateTimePickerEditingControl()
{
this.Format = DateTimePickerFormat.Custom;
this.CustomFormat = "dd MMM yyyy";
}
} -
what's the vb.Net counterpart of the following blocks in Csharp?
public class NullableDateTimePicker : System.Windows.Forms.DateTimePicker
{
// Default Constructor
public NullableDateTimePicker() : base()
{
base.Format = DateTimePickerFormat.Custom;
NullValue = " ";
Format = DateTimePickerFormat.Custom;
CustomFormat = "dd MMM yyyy";this.DataBindings.CollectionChanged += new CollectionChangeEventHandler(DataBindings\_CollectionChanged); }
}
//NullableDateTimePicker is the class from which DateTimePickerEditingControl class inherits.
//IDataGridViewEditingControl is the interface which DateTimePickerEditingControl class implements.
class DateTimePickerEditingControl : NullableDateTimePicker, IDataGridViewEditingControl
{
//Constructor
public DateTimePickerEditingControl()
{
this.Format = DateTimePickerFormat.Custom;
this.CustomFormat = "dd MMM yyyy";
}
}You know, that there are tools for conversing code from C# to VB.Net, do you? Just google for them.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
-
You know, that there are tools for conversing code from C# to VB.Net, do you? Just google for them.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
Never mind. I was making a small mistake. In block 1 it should be:
MyBase.New
In block 2 it should be:class DateTimePickerEditingControl Inherits NullableDateTimePicker Implements IDataGridViewEditingControl End Class
I was writing this in the first place:class DateTimePickerEditingControl Inherits NullableDateTimePicker, Implements IDataGridViewEditingControl End Class
-
what's the vb.Net counterpart of the following blocks in Csharp?
public class NullableDateTimePicker : System.Windows.Forms.DateTimePicker
{
// Default Constructor
public NullableDateTimePicker() : base()
{
base.Format = DateTimePickerFormat.Custom;
NullValue = " ";
Format = DateTimePickerFormat.Custom;
CustomFormat = "dd MMM yyyy";this.DataBindings.CollectionChanged += new CollectionChangeEventHandler(DataBindings\_CollectionChanged); }
}
//NullableDateTimePicker is the class from which DateTimePickerEditingControl class inherits.
//IDataGridViewEditingControl is the interface which DateTimePickerEditingControl class implements.
class DateTimePickerEditingControl : NullableDateTimePicker, IDataGridViewEditingControl
{
//Constructor
public DateTimePickerEditingControl()
{
this.Format = DateTimePickerFormat.Custom;
this.CustomFormat = "dd MMM yyyy";
}
}