Problems with New Features of VB9
I have 2 problems concerning the new array initializers and nullable types:
Then I use array initializers VB says that a type is espected - so type inference doesn't work here?
Second, the nullable types aren't implemented yet? Or why I can't write e.g.:
Code Snippet
Dim d As Date?
Thanks. Ralf Ehlert
Hi Ralf,
Type inference for arrays works, the syntax is Dim x = New Integer() {1, 2, 3}.
Nullable types will be in Beta2.
Hope that helps,
Jonathan
Hello Jonathan,
thanks for your help, it works :-) I have something expacted like Dim arr = new() {1,2,3} similar to the C# version var arr = new[] {1,2,3}; I use both languages but I prefer VB, because it is more productive and in this case I would prefer a C# like syntax without typing the type - I think this would be productive but the VB-Syntax is somehow neat.
Can you give any information or blog entries what we can expect from Beta2?
Thanks.