473,396 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Syntax conversion.

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

Expand|Select|Wrap|Line Numbers
  1. public class NullableDateTimePicker : System.Windows.Forms.DateTimePicker
  2.   {
  3.     // Default Constructor
  4.     public NullableDateTimePicker() : base()
  5.     {
  6.       base.Format = DateTimePickerFormat.Custom;
  7.       NullValue = " ";
  8.       Format = DateTimePickerFormat.Custom;
  9.       CustomFormat = "dd MMM yyyy";
  10.  
  11.       this.DataBindings.CollectionChanged += new CollectionChangeEventHandler(DataBindings_CollectionChanged);
  12.     }
  13. }


Expand|Select|Wrap|Line Numbers
  1. //NullableDateTimePicker is the class from which DateTimePickerEditingControl class inherits.
  2. //IDataGridViewEditingControl is the interface which DateTimePickerEditingControl class implements.
  3. class DateTimePickerEditingControl : NullableDateTimePicker, IDataGridViewEditingControl
  4.     {
  5.     //Constructor
  6.         public DateTimePickerEditingControl()
  7.         {
  8.             this.Format = DateTimePickerFormat.Custom;
  9.             this.CustomFormat = "dd MMM yyyy";
  10.         }
  11. }
Jun 4 '10 #1

✓ answered 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

2 1404
tlhintoq
3,525 Expert 2GB
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
Jun 4 '10 #2
priyamtheone
88 64KB
@tlhintoq
Never mind. I was making a small mistake.
In block 1 it should be:
Expand|Select|Wrap|Line Numbers
  1. MyBase.New
In block 2 it should be:
Expand|Select|Wrap|Line Numbers
  1. class DateTimePickerEditingControl
  2.     Inherits NullableDateTimePicker
  3.     Implements IDataGridViewEditingControl
  4. End Class
I was writing this in the first place:
Expand|Select|Wrap|Line Numbers
  1. class DateTimePickerEditingControl
  2.     Inherits NullableDateTimePicker, Implements IDataGridViewEditingControl
  3. End Class
Jun 6 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

31
by: Brian Sabbey | last post by:
Here is a pre-PEP for what I call "suite-based keyword arguments". The mechanism described here is intended to act as a complement to thunks. Please let me know what you think. Suite-Based...
6
by: Nick Weekes | last post by:
Hi all, I am trying to cast a Double (its actually the NextDouble method of the Random class, but could be any type of number) to a Type via its name. Im trying the following syntax: ...
11
by: Peter Oliphant | last post by:
I've been trying all morning to convert my 2003 project (managed) to 2005 (/clr since I have both managed and unmanaged code). I'm guessing I have tens of thousands of lines of code to change. Did...
47
by: rawCoder | last post by:
Hi, Just wanted to know if there is any speed difference between VB conversion Keywords like CInt, Clng, CStr, CDbl, CBool etc. ..NETs Convert.To<...> methods. And which is better to be...
14
by: Richard G. Riley | last post by:
Would it be wrong to use "implicit casting" instead of the standards "implicit conversion" when talking about implicit conversions between certain data types. The standard mentions "explicit...
5
by: =?Utf-8?B?U2hhaWxlbiBTdWt1bA==?= | last post by:
I have some code that was written in managed C++ using VS 2005. I want to convert that code into C#. Is there a tool available to do this? Thanks in advance. -- Shailen Sukul Architect (BSc...
0
by: Lou Evart | last post by:
DOCUMENT CONVERSION SERVICES Softline International (SII) operates one of the industry's largest document and data conversion service bureaus. In the past year, SII converted over a million...
8
by: Smithers | last post by:
Are there any important differences between the following two ways to convert to a type?... where 'important differences' means something more profound than a simple syntax preference of the...
1
by: drop | last post by:
Hi all, I'd like to know if it's possible to declare an implicit type conversion for when I use declarative Synthax in html. For example, when I have the DropDownList, I can declatively set...
21
by: REH | last post by:
It it permissible to use the constructor style cast with primitives such as "unsigned long"? One of my compilers accepts this syntax, the other does not. The failing one chokes on the fact that the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.