Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# to VB.NET: the **default** keyword? [duplicate]

Possible Duplicate:
Default value for generics

OK, so while translating some code from C# to VB.NET, I came across the default keyword, and I'm simply replacing it with nothing.

Is this the proper way to do it, or is there a better "translation" for that keyword?

like image 942
Pacerier Avatar asked May 07 '11 17:05

Pacerier


People also ask

What is the full name of C?

In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr.

What do you mean by C?

" " C is a computer programming language. That means that you can use C to create lists of instructions for a computer to follow. C is one of thousands of programming languages currently in use.

Why is C named so?

Quote from wikipedia: "A successor to the programming language B, C was originally developed at Bell Labs by Dennis Ritchie between 1972 and 1973 to construct utilities running on Unix." The creators want that everyone "see" his language. So he named it "C".


1 Answers

Yup, that's absolutely fine. While Nothing is usually meant to mean the equivalent of C#'s null, it can be used with value types to, to mean "the default value of that type".

like image 144
Jon Skeet Avatar answered Oct 05 '22 00:10

Jon Skeet