New features in vb.net 2005

T

tshad

Is there a place to see the new features in the VB.Net language in 2005?

I know that you can have nullable variables for one and in strings:

Dim s10 As String() = Regex.Split("Each word in this string will end up
being an item in this string array", " ")
For ktr As Integer = 0 To s10.Length
Console.WriteLine("s10 = {0}", s10(ktr))
Next

The "s10(ktr)" works in 2005 and doesn't in 2003.

Thanks,

Tom
 
T

Tom Dacon

Make that (s10.Length - 1) and it will work in both 2003 and 2005. As is, it
won't work in either.

Tom Dacon
Dacon Software Consulting
 
T

tshad

Tom Dacon said:
Make that (s10.Length - 1) and it will work in both 2003 and 2005. As is, it
won't work in either.

I agree and did.

But I can find some pages where it talks about some of the differences but
not all.

One I didn't find in the pages I was looking at was the one I was
mentioning - s10(ktr) will generate an error in 2003 and you must use
s10.Substring(ktr,1) to get at a particular character in a string. In c#
you can do s10[ktr] to get the character or s10.Substring(ktr,1) (as in
vb.net). In 2005, apparently getting the character directly works. Not
sure if it is more efficient or not but it is a change that I can't see
documented but I am not sure what they would call it.

Thanks,

Tom
 
P

Patrice

I believe the confusion could be caused by the datatype. Keep in mind that
s10 in an array. So s10(x) returns a string. You may want to use s10(x)(y)
to get a char in this string...

--
Patrice

tshad said:
Tom Dacon said:
Make that (s10.Length - 1) and it will work in both 2003 and 2005. As is, it
won't work in either.

I agree and did.

But I can find some pages where it talks about some of the differences but
not all.

One I didn't find in the pages I was looking at was the one I was
mentioning - s10(ktr) will generate an error in 2003 and you must use
s10.Substring(ktr,1) to get at a particular character in a string. In c#
you can do s10[ktr] to get the character or s10.Substring(ktr,1) (as in
vb.net). In 2005, apparently getting the character directly works. Not
sure if it is more efficient or not but it is a change that I can't see
documented but I am not sure what they would call it.

Thanks,

Tom
Tom Dacon
Dacon Software Consulting
 
R

Rad [Visual C# MVP]

Is there a place to see the new features in the VB.Net language in 2005?

I know that you can have nullable variables for one and in strings:

Dim s10 As String() = Regex.Split("Each word in this string will end up
being an item in this string array", " ")
For ktr As Integer = 0 To s10.Length
Console.WriteLine("s10 = {0}", s10(ktr))
Next

The "s10(ktr)" works in 2005 and doesn't in 2003.

Thanks,

Tom

Try the What's New index in MSDN. They give details of what's new in
the .NET framework 2 for VB.NET, C#, C++, etc
 
C

CMoya

This month's Visual Studio Magazine has an OK article on some of the new
stuff. But, yeah, in depth, non-cursory, discussions on what's new is hard
to find. Most chatter centers around LINQ (enough already!) while details on
other improvements (like improvements in the designers etc.) is hard to come
by.
 
B

Bill McCarthy

Hi C,

CMoya said:
This month's Visual Studio Magazine has an OK article on some of the new
stuff. But, yeah, in depth, non-cursory, discussions on what's new is hard
to find. Most chatter centers around LINQ (enough already!) while details
on other improvements (like improvements in the designers etc.) is hard to
come by.

In the January column of OnVB,
http://visualstudiomagazine.com/columns/columnist.aspx?columnistsid=69 , I
focused on the new XML features as I thought that was the biggest and most
significant feature. The more I use XML in VB9 the more I love it, and it
really does change the way you work with XML.

A lot of the other 2008 features I had already covered in earlier columns.
The quick reference guide :
http://visualstudiomagazine.com/listings/list.aspx?id=252
provides an over view and links to earlier columns that drill down on more
detail of the features.

We do love to get feedback, so please do email me or the editor, or leave a
comment online :)

Regards,

Bill McCarthy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top