I have a variable called GenericVar that, in different situations, will hold the names of other vari...
By psychotron
Hi,I have a VS2003 solution that includes CSharp (CS), managed C++(MCPP) and unmanaged C++ (UMCPP) p...
By alancobb
I'm trying to update my data source using the Update method inOleDbDataAdapter with automatic comman...
By zuytran
Hey all! First time poster, long time browser. :p I was wondering if anyone could help me out a litt...
By systemslave
I cannot get my OleDbDataAdapter to update my databasetable from my local dataset table. The Knowled...
By m_davidjohnson
hii am new in asp.net world and i am facing few minor problems asmentioned in the subject. plz help ...
By sudhirkaul
hii am new in asp.net world and i am facing few minor problems asmentioned in the subject. plz help ...
By sudhirkaul
What the heck - I can't find it. A bit shocked to see it missing though.So "Does VB.NET have the yie...
By sahilmalikmvp, 54 Comments
Hi all,I'm running into this problem when it comes to determining a network logged on username ...
By dutchcoder, 1 Comments
How is it possible to refresh an OleDbDataAdapter?I have a data-entry form with a DataGrid displayin...
By croydon, 5 Comments
Hi all:I am just wondering if it's possible to call Unix script from VB.Netapplication.Thanks in...
By alanwang, 1 Comments
HiI've just begun programming VB, attending a college course. The last weeksI've been using my works...
By andy, 3 Comments
How do I make it if a user hits enter on a NumericUpDown1_KeyPress, it does something, what is the i...
By xxarmoxx, 1 Comments
Is it possible to have the source in one window and the design in anotherwindow and perhaps the code...
By reidar, 9 Comments
Hello,I have a txt file that I need to validate before importing in a database. Inorder to be valid,...
By catalinporancea, 11 Comments
Sahil,
Please to give better posibilities to research and therefore a better
product, use this newsgroups for Net 2.0 and related products.
Lab
http://lab.msdn.microsoft.com/vs2005/community/
I hope this helps,
Cor
corligthert | Fri, 06 Jun 2008 11:40:00 GMT |
Cor,
I checked that place - no help there.
I must say, I am incredibly frustrated and very annoyed that something as
important as the "yield" keyword would be missed out of VB.NET.
Now try writing a SQLCLR TVF and the 3 lines it takes to accomplish it in C#
translate to 3 pages of buggy VB.NET code. Highly Highly Highly Highly
stupid to miss that out IMO.
- Sahil Malik [MVP]
Upcoming ADO.NET 2.0 book - http://tinyurl.com/9bync
"Cor Ligthert" <notmyfirstname...planet.nl> wrote in message
news:Owr9F96dFHA.1384...TK2MSFTNGP09.phx.gbl...
> Sahil,
> Please to give better posibilities to research and therefore a better
> product, use this newsgroups for Net 2.0 and related products.
> Lab
> http://lab.msdn.microsoft.com/vs2005/community/
> I hope this helps,
> Cor
>
sahilmalikmvp | Fri, 06 Jun 2008 11:41:00 GMT |
Sahil,
I think that this reaches where you are looking for. This old Visual Basic
keyword is probably one of the reasons why what is in C language called
Static is called in VBNet Shared.
http://msdn.microsoft.com/library/de...ialization.asp
I hope this helps,
Cor
corligthert | Fri, 06 Jun 2008 11:42:00 GMT |
Cor,
I'm not talking about "Static/Shared" .. I am talking about "Yield".
- Sahil Malik [MVP]
Upcoming ADO.NET 2.0 book - http://tinyurl.com/9bync
"Cor Ligthert" <notmyfirstname...planet.nl> wrote in message
news:uf7uBc7dFHA.1600...tk2msftngp13.phx.gbl...
> Sahil,
> I think that this reaches where you are looking for. This old Visual Basic
> keyword is probably one of the reasons why what is in C language called
> Static is called in VBNet Shared.
> http://msdn.microsoft.com/library/de...ialization.asp
> I hope this helps,
> Cor
>
sahilmalikmvp | Fri, 06 Jun 2008 11:43:00 GMT |
>So "Does VB.NET have the yield keyword, or any equivalent of it" ?
No. Different languages have different features.
Mattias
Mattias Sjgren [MVP] mattias ... mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
mattiassjgren | Fri, 06 Jun 2008 11:44:00 GMT |
Thanks Mattias. Finally a direct answer to a simple question.
- Sahil Malik [MVP]
Upcoming ADO.NET 2.0 book - http://tinyurl.com/9bync
"Mattias Sjgren" <mattias.dont.want.spam...mvps.org> wrote in message
news:uYJMHQ8dFHA.796...TK2MSFTNGP09.phx.gbl...
> No. Different languages have different features.
>
> Mattias
> --
> Mattias Sjgren [MVP] mattias ... mvps.org
> http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
> Please reply only to the newsgroup.
sahilmalikmvp | Fri, 06 Jun 2008 11:45:00 GMT |
Sahil,
> I'm not talking about "Static/Shared" .. I am talking about "Yield".
>
I assume that you do not know what Static is in VBNet, therefore I gave you
the link to the page.
If you want a mercedes with a chevrolet logo, than you have to put that logo
on it yourself, Mercedes does not do that for you.
However I find the Mercedes logo is not bad at all
static d as integer
For each a in b
d += 1
Next
This gives you at the end of your program the total result of loops or if
you set it conditional to zero let you go on where you was in the loop.
I am not busy with 2005, however short reading gave me the idea that this
was the idea.
I hope this helps,
Cor
corligthert | Fri, 06 Jun 2008 11:46:00 GMT |
Cor Ligthert wrote:
> Sahil,
> I assume that you do not know what Static is in VBNet, therefore I
> gave you the link to the page.
> If you want a mercedes with a chevrolet logo, than you have to put
> that logo on it yourself, Mercedes does not do that for you.
> However I find the Mercedes logo is not bad at all
> static d as integer
> For each a in b
> d += 1
> Next
> This gives you at the end of your program the total result of loops
> or if you set it conditional to zero let you go on where you was in
> the loop.
> I am not busy with 2005, however short reading gave me the idea that
> this was the idea.
yield is a keyword which is only valid in custom enumerator routines
('iterators'), something which is C# 2.0 only if I'm not mistaken. It's
therefore logical VB.NET doesn't have a yield equivalent, as it doesn't
support custom iterator creation (though it's my understanding it does
support consuming them). At least, that's my understanding, but I might
have overlooked something.
Therefore, babbling about static/shared is erm... completely
irrelevant ;)
FB
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
fransboumacmvp | Fri, 06 Jun 2008 11:47:00 GMT |
Sahil Malik [MVP] wrote:

> What the heck - I can't find it. A bit shocked to see it missing
> though.
> So "Does VB.NET have the yield keyword, or any equivalent of it" ?
yield is a keyword for custom iterators, which IMHO is something
which is C# only.
However, it's not hard to work around it. After all, we all write code
today which works OK right?
FB
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
fransboumacmvp | Fri, 06 Jun 2008 11:48:00 GMT |