|
Far better: he's got common sense.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
Colborne_Greg wrote: fortunately, no with operator in C#
FTFY
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
I have to say, you walked right into that one.
|
|
|
|
|
No better way to learn.
I was told that C# and visual basic are the same language but I can find things in Visual Basic that are not in C# and things in C# that are not in Visual Basic
|
|
|
|
|
That's what makes C# better than VB.
Try writing an event that returns a value in VB.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
|
|
PIEBALDconsult wrote: Try writing an event that returns a value in VB
How do you do that in C# that you can't do in VB?
|
|
|
|
|
Consider these two C# statements:
public delegate bool IsItSafe() ;
public event IsItSafe Probe ;
they compile just fine and actually work as they should, but the VB.net equivalent:
Delegate Function IsItSafe() as Boolean
Event Probe As IsItSafe
yields:
C:\Projects\Template.vb(26) : error BC31084: Events cannot be declared with a delegate type that has a return type.
Event Probe As IsItSafe
~~~~~
Not that it's something that is common, but I do use a few events that return bool values in an unusual project of mine.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
|
They use the same underlying IL machine. I don't think its said anywhere that they are exactly the same.. If you read the book on the IL assembler the author talks in great detail on the differences between VB and C# and how the IL abstractions express them both. That qualifies this argument as a strawman.
|
|
|
|
|
Wrong.
You just gave the exact details of the situation reinforcing their similarities.
|
|
|
|
|
You didn't read my post? There are different portions of the IL set used by both languages.. its why they are different. This isn't subject to opinion, its stated fact. Seriously, don't take my word for it:
The book is 'Expert .NET 2.0 IL Assembly Language'.. the author is Serge Lidin, HE IS THE DESIGNER OF THE IL LAYER. Most of the language uses very similar constructs.. but NOT ALL.
Are you intentionally trolling here?
|
|
|
|
|
My original post.
Yes not all or Visual basic would be C#.
|
|
|
|
|
With his pants on fire
I read somewhere that there are things that VB can do and C# can't an vice versa though... Think it had something to do with Errorhandling ?
|
|
|
|
|
|
Inline XML? Does C# have that yet?
|
|
|
|
|
|
Its more than that.. some of the object oriented structures in use in the underlying IL differ between C# and VB. Serge Lidin's IL book covers these differences. If you have to read both languages (and sometimes I do), its useful to know.
|
|
|
|
|
You can write code that fails completely silently in other languages too
|
|
|
|
|
|
What if Pictures is null?
|
|
|
|
|
If pictures is null the memory space creates itself and returns a empty album list
|
|
|
|
|
I think he is referring to the empty catch, it was my first thought. Oh a new version of resume next
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
He asked what if pictures were null.
It's actually a shared class, and this procedure is only for displaying what is in the system.
|
|
|
|