Syntax conversion.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • priyamtheone
    New Member
    • Sep 2007
    • 88

    Syntax conversion.

    what's the vb.Net counterpart of the following blocks in Csharp?

    Code:
    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);
        }
    }


    Code:
    //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";
            }
    }
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    A simple google for "C# to VB.NET" will get a lot of code translators, tutorials and cheat sheets for this sort of work.

    Comment

    • priyamtheone
      New Member
      • Sep 2007
      • 88

      #3
      Originally posted by tlhintoq
      A simple google for "C# to VB.NET" will get a lot of code translators, tutorials and cheat sheets for this sort of work.
      http://www.google.com/search?client=...UTF-8&oe=UTF-8
      Never mind. I was making a small mistake.
      In block 1 it should be:
      Code:
      MyBase.New
      In block 2 it should be:
      Code:
      class DateTimePickerEditingControl
      	Inherits NullableDateTimePicker
      	Implements IDataGridViewEditingControl
      End Class
      I was writing this in the first place:
      Code:
      class DateTimePickerEditingControl
      	Inherits NullableDateTimePicker, Implements IDataGridViewEditingControl
      End Class

      Comment

      Working...