473,397 Members | 1,972 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,397 software developers and data experts.

Some changes to VB (Whidbey) that may interest you

Just got my hands on Whidbey. Here are a few interesting changes that you
may not be aware of:

1. Continue statement on Do, For and While commands

2. Default Instances of certain classes are back (such as forms).

3. Properties can now have mixed access levels. For example you can
declare a property like this:

Public Property SomeVal() As Integer
Get
Return m_val
End Get

Private Set(ByVal Value As Integer)
m_val = Value
End Set
End Property

4. IsNot keyword. Now instead of If Not someObj Is Nothing, you can
write If someObj IsNot Nothing

Not to mention Operator Overloading, Unsigned types, Generics, Partial
types.
--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #1
19 1076
"Chris Dunaway" <dunawayc@_lunchmeat_sbcglobal.net> schrieb
Just got my hands on Whidbey. Here are a few interesting changes
that you may not be aware of:


Only a question: Is it legal to make this informatin public?
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
In article <to*****************************@40tude.net>, Chris Dunaway wrote:
Just got my hands on Whidbey. Here are a few interesting changes that you
may not be aware of:

1. Continue statement on Do, For and While commands

Wooo! Hooo! Now if they would extend the Continue and Exit XXX
statements to use labels - then they could do away with Goto completely
:) Like Java's labeled breaks and continues...
2. Default Instances of certain classes are back (such as forms).

I personaly can live with out that... Never used 'em in VB.CLASSIC, so
I don't expect to now :) But, it will make a lot of other peoples lives
easier.
3. Properties can now have mixed access levels. For example you can
declare a property like this:

Public Property SomeVal() As Integer
Get
Return m_val
End Get

Private Set(ByVal Value As Integer)
m_val = Value
End Set
End Property

Nice... Not essential, but it makes mixed access conceptualy cleaner
then having a public property Get, private method setter...
4. IsNot keyword. Now instead of If Not someObj Is Nothing, you can
write If someObj IsNot Nothing

Lame...
Not to mention Operator Overloading, Unsigned types, Generics, Partial
types.


Wooo! Hoooo! Especially the unsigned types and generics.

--
Tom Shelton
MVP [Visual Basic]
Nov 20 '05 #3
* "Armin Zingler" <az*******@freenet.de> scripsit:
Just got my hands on Whidbey. Here are a few interesting changes
that you may not be aware of:


Only a question: Is it legal to make this informatin public?


AFAIK yes. Most of this information has been presented at the PDC.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #4
On Thu, 13 Nov 2003 18:10:39 +0100, Armin Zingler wrote:
"Chris Dunaway" <dunawayc@_lunchmeat_sbcglobal.net> schrieb
Just got my hands on Whidbey. Here are a few interesting changes
that you may not be aware of:


Only a question: Is it legal to make this informatin public?


Well, I never signed any NDA and a quick read of the eula doesn't seem to
indicate that I cannot post this information. This DVD was the same one
given out at the PDC so I imagine that it's ok.

I have heard from some beta testers that they received a e-mail from MS
releasing them from their NDA's, so I guess the cat is offically out of the
bag.
--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #5
On Thu, 13 Nov 2003 09:22:58 -0800, Tom Shelton wrote:
2. Default Instances of certain classes are back (such as forms).

I personaly can live with out that... Never used 'em in VB.CLASSIC, so
I don't expect to now :) But, it will make a lot of other peoples lives
easier.


This doesn't work exactly like VB classic. You have to use the new "My"
object: My.Forms.Form1.Show
Not to mention Operator Overloading, Unsigned types, Generics, Partial
types.


Wooo! Hoooo! Especially the unsigned types and generics.

Oh, and I forgot to mention Edit and Continue and XML documentation.
--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #6
Cor
Hi Chris,
4. IsNot keyword. Now instead of If Not someObj Is Nothing, you can
write If someObj IsNot Nothing


This looks greath to me

If Not someObj IsNot Nothing

:-)) I hope they skip it before it comes actual

It has in my opinion to be (came out some arguing between Jay B and me)

If someObj Is Something

Cor
Nov 20 '05 #7
In article <16******************************@40tude.net>, Chris Dunaway wrote:
On Thu, 13 Nov 2003 09:22:58 -0800, Tom Shelton wrote:
2. Default Instances of certain classes are back (such as forms).


I personaly can live with out that... Never used 'em in VB.CLASSIC, so
I don't expect to now :) But, it will make a lot of other peoples lives
easier.


This doesn't work exactly like VB classic. You have to use the new "My"
object: My.Forms.Form1.Show
Not to mention Operator Overloading, Unsigned types, Generics, Partial
types.


Wooo! Hoooo! Especially the unsigned types and generics.

Oh, and I forgot to mention Edit and Continue and XML documentation.


<spit>E&C</spit> I don't need no stinking E&C... I really don't mind
if they include it... I just will probably never use it. I never used
it when we did have it :)

XML docs are good, but I think over rated.

--
Tom Shelton
MVP [Visual Basic]
Nov 20 '05 #8
>
If Not someObj IsNot Nothing

Is this Obfuscation before compile?
Nov 20 '05 #9
Armin,
You can download the info from:

http://msdn.microsoft.com/vbasic/whidbey/

So far it is a copy of what is on the PDC DVDs.

The rule of thumb I go by is if you can find it on MSDN, then you can talk
about it in public.

Hope this helps
Jay

"Armin Zingler" <az*******@freenet.de> wrote in message
news:ei**************@TK2MSFTNGP09.phx.gbl...
"Chris Dunaway" <dunawayc@_lunchmeat_sbcglobal.net> schrieb
Just got my hands on Whidbey. Here are a few interesting changes
that you may not be aware of:


Only a question: Is it legal to make this informatin public?
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #10
Chris,
This doesn't work exactly like VB classic. You have to use the new "My"
object: My.Forms.Form1.Show And it appears to be controlled by an attribute, and the Singleton Pattern.

Tell Whidbey to show attributes and check out the designer generated code.

Hope this helps
Jay
"Chris Dunaway" <dunawayc@_lunchmeat_sbcglobal.net> wrote in message
news:16******************************@40tude.net.. . On Thu, 13 Nov 2003 09:22:58 -0800, Tom Shelton wrote:
2. Default Instances of certain classes are back (such as forms).


I personaly can live with out that... Never used 'em in VB.CLASSIC, so
I don't expect to now :) But, it will make a lot of other peoples lives
easier.


This doesn't work exactly like VB classic. You have to use the new "My"
object: My.Forms.Form1.Show
Not to mention Operator Overloading, Unsigned types, Generics, Partial
types.


Wooo! Hoooo! Especially the unsigned types and generics.

Oh, and I forgot to mention Edit and Continue and XML documentation.
--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.

Nov 20 '05 #11
Chris,
Don't forget the Using statement, if you use Dispose as you are suppose to
Using is going to be a life saver (well a typing saver)!

The one caution I would like to remind every one about. The PDC bits are
Technology Preview (read a pre alpha & pre beta).

Which means that during subsequent betas that "names & faces" may change. As
a recent thread suggests. Originally in VB.NET 1.0 alpha there were BitAnd &
BitOr operators, which were dropped in favor of the original And & Or
operators & the AndAlso & OrElse operators for the Beta 2 release.

So although we see a IsNot (Woo Hoo!!!!) it may (or may not) be changed in a
subsequent beta.

I just wish I knew where more info on the Generics in VB.NET is. The only
real document I know about is the "Sample Chapter on Generics" at
http://msdn.microsoft.com/vbasic/whidbey/ which is the same document on the
PDC DVD, however it is not enough. More Input! More Input! Luckily I know
C++ templates & have lots of C# samples, so some of it I have 'figured' out.

Oh! This blog is good for the new VB.NET features
http://blogs.gotdotnet.com/cambecc/ He currently covers Operator Overloading
& Unsigned Types.

Hope this helps
Jay

"Chris Dunaway" <dunawayc@_lunchmeat_sbcglobal.net> wrote in message
news:to*****************************@40tude.net...
Just got my hands on Whidbey. Here are a few interesting changes that you
may not be aware of:

1. Continue statement on Do, For and While commands

2. Default Instances of certain classes are back (such as forms).

3. Properties can now have mixed access levels. For example you can
declare a property like this:

Public Property SomeVal() As Integer
Get
Return m_val
End Get

Private Set(ByVal Value As Integer)
m_val = Value
End Set
End Property

4. IsNot keyword. Now instead of If Not someObj Is Nothing, you can
write If someObj IsNot Nothing

Not to mention Operator Overloading, Unsigned types, Generics, Partial
types.
--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.

Nov 20 '05 #12
* Chris Dunaway <dunawayc@_lunchmeat_sbcglobal.net> scripsit:
I have heard from some beta testers that they received a e-mail from MS
releasing them from their NDA's, so I guess the cat is offically out of the
bag.


ACK.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #13
Cor,
If Not someObj IsNot Nothing
:-)) I hope they skip it before it comes actual
I hope you realise most people will normally use:

If someObject IsNot Nothing Then
someObject.DoSomething()
End If

Rather then:

If Not someObject IsNot Nothing Then
' This space intentionally left blank
Else
someObject.DoSomething()
End If

I am curious if Not IsNot will cause an error...
It has in my opinion to be (came out some arguing between Jay B and me) I didn't think we were arguing ;-)

I prefer: If someObj Is Something
As its more "positive", however IsNot also works, so I'm happy ;-)

Hope this helps
Jay

"Cor" <no*@non.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... Hi Chris,
4. IsNot keyword. Now instead of If Not someObj Is Nothing, you can
write If someObj IsNot Nothing


This looks greath to me

If Not someObj IsNot Nothing

:-)) I hope they skip it before it comes actual

It has in my opinion to be (came out some arguing between Jay B and me)

If someObj Is Something

Cor

Nov 20 '05 #14
Do language changes apply in the Compact Framework?

--

Justin Weinberg
Designing a PrintDocument? Drawing to forms?
Check out GDI+ Architect at www.mrgsoft.com
"Chris Dunaway" <dunawayc@_lunchmeat_sbcglobal.net> wrote in message
news:to*****************************@40tude.net...
Just got my hands on Whidbey. Here are a few interesting changes that you
may not be aware of:

1. Continue statement on Do, For and While commands

2. Default Instances of certain classes are back (such as forms).

3. Properties can now have mixed access levels. For example you can
declare a property like this:

Public Property SomeVal() As Integer
Get
Return m_val
End Get

Private Set(ByVal Value As Integer)
m_val = Value
End Set
End Property

4. IsNot keyword. Now instead of If Not someObj Is Nothing, you can
write If someObj IsNot Nothing

Not to mention Operator Overloading, Unsigned types, Generics, Partial
types.
--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.

Nov 20 '05 #15
Jay,
I just wish I knew where more info on the Generics in VB.NET is. The only
real document I know about is the "Sample Chapter on Generics" at
http://msdn.microsoft.com/vbasic/whidbey/ which is the same document on the
PDC DVD, however it is not enough. More Input! More Input! Luckily I know
C++ templates & have lots of C# samples, so some of it I have 'figured' out.


Any particular piece of information you think is missing?

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Nov 20 '05 #16
Mattias,
Any particular piece of information you think is missing?
The proper syntax! ;-) I don't think there is a piece missing per se,
because of the preview-ness of Whidbey the VB.NET syntax is not fully
documented... (as the MSDN article says the C# syntax is "stabilized"
already for generics.
http://msdn.microsoft.com/msdnmag/is...T/default.aspx)

For example in C# I can use the constructor constraint:

class MyFactory<T,P> where T : new()

How do I say that in VB.NET?

In C# I can list more then one interface or base class on the interface &
base class constraints.

class Node<T> where T : IComparable, IFormatable

I figured out you use & in VB.NET:

Class Node(Of T As IComparable & IFormatable)

However I do not see "&" documented. :-)

How do I implement a generic interface such as
System.Collections.Generics.IList(of T)?

I have something that compiles, however it does not run. Of course this is a
preview version of the compiler and I may be asking too much of it at this
time ;-)

Thanks for any links!
Jay

"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... Jay,
I just wish I knew where more info on the Generics in VB.NET is. The only
real document I know about is the "Sample Chapter on Generics" at
http://msdn.microsoft.com/vbasic/whidbey/ which is the same document on thePDC DVD, however it is not enough. More Input! More Input! Luckily I know
C++ templates & have lots of C# samples, so some of it I have 'figured'
out.
Any particular piece of information you think is missing?

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.

Nov 20 '05 #17
Jay,
For example in C# I can use the constructor constraint:

class MyFactory<T,P> where T : new()

How do I say that in VB.NET?

In C# I can list more then one interface or base class on the interface &
base class constraints.

class Node<T> where T : IComparable, IFormatable

I figured out you use & in VB.NET:

Class Node(Of T As IComparable & IFormatable)

However I do not see "&" documented. :-)
The & syntax is gone, fortunately. Many alternatives were discussed,
and the current constraint syntax is

Class MyGen(Of S As Foo, T As {Bar, Baz})

(wohoo, more curlies! ;-) I hope I got that right, I'm typing from
memory here. It was covered in the MSDN chat two days ago.

The New constraint should be supported eventually as well, but I don't
think it is in the PDC bits.

How do I implement a generic interface such as
System.Collections.Generics.IList(of T)?
Just the way you'd expect to

Class Foo
Implements IList(Of String)

Sub Clear() Implements IList(Of String).Clear
...
End Class

I have something that compiles, however it does not run.
In what way does it fail to run?

Of course this is a
preview version of the compiler and I may be asking too much of it at this
time ;-)


Yeah, there's much left to be implemented.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Nov 20 '05 #18
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> schrieb
Armin,
You can download the info from:

http://msdn.microsoft.com/vbasic/whidbey/

So far it is a copy of what is on the PDC DVDs.

The rule of thumb I go by is if you can find it on MSDN, then you can
talk about it in public.


Yes, thx, I just haven't had a closer look so far.
--
Armin

Nov 20 '05 #19
Mattias,
I get a "Fatal Execution Engine Error"
The & syntax is gone, fortunately. Many alternatives were discussed,
and the current constraint syntax is

Class MyGen(Of S As Foo, T As {Bar, Baz}) See something changed already (referring to my earlier caution) ;-)

Curlies make sense & regular parentheses make sense... I was thinking And
instead of &.
Class Foo
Implements IList(Of String)

Sub Clear() Implements IList(Of String).Clear
...
End Class Yes I got the above to work, however I was playing with defining a Generic
Type.

Class Foo(Of ItemType)
Implements IList(Of ItemType)

Sub Clear() Implements IList(Of ItemType).Clear

End Class

The above gives me an error about "Type argument 'ItemType' does not inherit
from or implement 'System.Object'", when "obviously" it does as its a Type
in .NET. If I give 'ItemType As Object' or other class it then compiles
however I then get the "Fatal Execution Engine Error", which is where I
think the preview still has a couple of rough edges ;-)

I think I may step back, and try implementing a simply generic interface in
my generic class.

Thanks
Jay

"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:eh**************@TK2MSFTNGP09.phx.gbl... Jay,
For example in C# I can use the constructor constraint:

class MyFactory<T,P> where T : new()

How do I say that in VB.NET?

In C# I can list more then one interface or base class on the interface &
base class constraints.

class Node<T> where T : IComparable, IFormatable

I figured out you use & in VB.NET:

Class Node(Of T As IComparable & IFormatable)

However I do not see "&" documented. :-)


The & syntax is gone, fortunately. Many alternatives were discussed,
and the current constraint syntax is

Class MyGen(Of S As Foo, T As {Bar, Baz})

(wohoo, more curlies! ;-) I hope I got that right, I'm typing from
memory here. It was covered in the MSDN chat two days ago.

The New constraint should be supported eventually as well, but I don't
think it is in the PDC bits.

How do I implement a generic interface such as
System.Collections.Generics.IList(of T)?


Just the way you'd expect to

Class Foo
Implements IList(Of String)

Sub Clear() Implements IList(Of String).Clear
...
End Class

I have something that compiles, however it does not run.


In what way does it fail to run?

Of course this is a
preview version of the compiler and I may be asking too much of it at thistime ;-)


Yeah, there's much left to be implemented.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.

Nov 20 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: mt | last post by:
Where can I access the Page_Load event in Whidbey for a C# ASP.NET website? Since the partial class has been introduced, I'm not sure where I should be putting page load events. Thanks very...
32
by: Fresh Air Rider | last post by:
Hi I understand that ASP.net 2.0 (Whidbey) is going to reduce coding by 70%. Surely this is going to de-skill or dumb down the developer's task and open up the task of web development to less...
2
by: Bern McCarty | last post by:
The recent questions about C++/CLI in this group made me wonder if some folks had their hands on it.... Is it available someplace? How is the calendar shaping up for Whidbey Beta 1?
3
by: Doug Holland | last post by:
Hi There I just installed the PDC build of Whidbey onto Windows XP using the 'Web Developer' profile when I installed and was a little surprised to see that it is only ASP.NET projects that I...
4
by: kimpton | last post by:
Hi, My App running on my local machine is trying to access apsx and ascx pages via a virtual directory (see earlier post) that points to a share on a different machine. I can now access .aspx...
4
by: Paul Aspinall | last post by:
Hi Does anyone have an overview of the changes to ASP.NET 2.0, since ASP.NET 1.1?? Thanks
5
by: rogsonl | last post by:
My computer was moved last week, and the company changed the network groups we work on. As a result, one of the main benefits from Whidbey (database connectivity) no longer works. Situation: 1....
0
by: RaiderXCChamp | last post by:
Hi! I am supposed to create a program that will display an investment schedule in a list box for my Visual Basics Class. 1. It says that annual interest is calculated using the simple interest...
3
by: Henry Jones | last post by:
I am using VB.NET VS 2005 and I have a datagridview bound to a table. This table has rate information on bank loans. The fiels are ProductName, MinDeposit, Rate, and PreviousRate On the grid...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.