From VB.net to C# - Page 13


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Page 13 of 14 FirstFirst ... 311121314 LastLast
Results 181 to 195 of 196

Thread: From VB.net to C#

  1. #181
    Ian R Guest

    Re: From VB.net to C#

    "Thomas Eyde" <thomas.eyde@online.no> wrote in message
    news:3cb17d98$1@10.1.10.29...
    > Please tell me: Is everything in VB.Net consistent with VBc?
    >


    No. But similiar things should be similar and consistent. Ie modifiers on
    methods.

    > I don't think this is the case (hint: Properties, Inherits on a second
    > line..). So please don't use inconsistence as an argument.


    But we're talking about modifiers on methods.
    VB6 uses implements on a different line so I see no problem with using
    inherits on a different line.



  2. #182
    Ian R Guest

    Re: From VB.net to C#


    "Mike Mitchell" <kylix_is@yahoo.co.uk> wrote in message
    news:3cb1eb9a.2077576@news.devx.com...
    >
    > Obvious to whom? How "obvious"? Oh, perhaps you mean, "Let's just


    Obvious to me. Perhaps (read most likely) others as well.

    > claim he wrote it deliberately so that we can say he was *****ing and
    > thus we can make him appear stupid and therefore we score a point,


    We don't have to do anything to make you appear stupid. You're doing just
    fine by yourself.




  3. #183
    Ed Courtenay Guest

    Re: From VB.net to C#


    "Mike Mitchell" <kylix_is@yahoo.co.uk> wrote in message
    news:3cb22542.16838542@news.devx.com...
    > On Mon, 8 Apr 2002 15:53:26 -0400, "Daniel Pratt"
    > <dprREMOVETHISatt71@hotmail.com> wrote:
    >
    > > Most of the time your uninformed drivel doesn't bother me in the
    > >slightest. This time, however, you managed to annoy me greatly.

    >
    > Next time I read:
    >
    > "<italic>.NET is all about Web Services.</italic> No doubt about it."
    >
    > I shall translate it in my mind as:
    >
    > "<italic>.NET is all about Web Services.</italic> There is doubt about
    > it."
    >
    > Then I shall be assured of correctly interpreting the meaning.
    >
    > MM


    No, the next time you read:

    <h1>Clearing Up .NET Misunderstandings</h1>
    ....
    <p><em>NET is all about Web Services</em>No doubt about it. Microsoft
    has...</p>

    maybe you'd simply like to read something in context. It might interest you
    to know that my 10 year old nephew managed to understand the implication of
    that paragraph, even if you couldn't.

    So, are you going to apologise to Patrick yet? Have you finally understood
    that ".NET is not all about Web Services" yet? One of these days I might
    actually get a straight answer...



  4. #184
    Thomas Eyde Guest

    Re: From VB.net to C#

    ....and I don't see the problem using method modifiers on a new line. Not
    that I believe this change will ever be implemented.

    ..Thomas

    "Ian R" <ianr@na.net> wrote in message news:3cb2b6ad@10.1.10.29...
    > > I don't think this is the case (hint: Properties, Inherits on a second
    > > line..). So please don't use inconsistence as an argument.

    >
    > But we're talking about modifiers on methods.
    > VB6 uses implements on a different line so I see no problem with using
    > inherits on a different line.





  5. #185
    MarkN Guest

    Re: From VB.net to C#


    It is simple for simple things. But it is horribly complex for complex things.

    Mark

    kylix_is@yahoo.co.uk (Mike Mitchell) wrote:
    >On 8 Apr 2002 12:42:06 -0800, "Jason" <jason@creative_nospam_corp.com>
    >wrote:
    >
    >>But Mike, classic VB is not simple. It's not even close.

    >
    >Nonsense. It is the simplest, easiest modern computer language that is
    >the most flexible (VB/VBScript/VBA), the most accessible (anyone of
    >average intelligence can learn it in 21 days), and the most successful
    >(at least 3 million programmers, plus countless millions of
    >end-users).
    >
    >MM



  6. #186
    Kunle Odutola Guest

    Re: From VB.net to C#


    "Thomas Eyde" <thomas.eyde@online.no> wrote in message
    news:3cb2c645@10.1.10.29...
    > ...and I don't see the problem using method modifiers on a new line. Not
    > that I believe this change will ever be implemented.


    Neither do I Thomas:

    Protected Overloads Overrides _
    Sub Dispose(ByVal disposing As Boolean)
    ........
    ........

    Enjoy ;-)

    Kunle

    >
    > .Thomas
    >
    > "Ian R" <ianr@na.net> wrote in message news:3cb2b6ad@10.1.10.29...
    > > > I don't think this is the case (hint: Properties, Inherits on a second
    > > > line..). So please don't use inconsistence as an argument.

    > >
    > > But we're talking about modifiers on methods.
    > > VB6 uses implements on a different line so I see no problem with using
    > > inherits on a different line.

    >
    >
    >



  7. #187
    Mattias Sjögren Guest

    Re: From VB.net to C#

    Constance,

    >When you get the chance, I hope you'll post some specifics.


    OK, I finally took time to read through the book again. Here are a
    couple of things that he doesn't cover. There are more, but these are
    the ones I can think of now that I think are quite important.

    - out parameters in C#
    - The ability to write custom add/remove event accessors in C#
    - Escape characters and verbatim strings in C#
    - The checked and unchecked operators in C#
    - Exception filters in VB.NET
    - The as operator in C#
    - C#'s using blocks (*)
    - volatile fields in C# (*)
    - Easy late binding in VB.NET (**)
    - The VB.NET With statement (**)


    * Might not have been implemented when he wrote the book, but there
    has been plenty of time for him to include it on the updates page on
    desaware.com.
    ** Not originally included in the book, but has later been covered on
    desaware.com.


    Also, I'm missing a section on the different features in the VS.NET
    IDE - there are quite a few differences there.



    Mattias

    ===
    Mattias Sjögren (VB MVP)

  8. #188
    Constance J. Petersen Guest

    Re: From VB.net to C#

    Hi Mattias,

    "Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message
    news:3cb2d238@10.1.10.29...
    > OK, I finally took time to read through the book again. Here are a
    > couple of things that he doesn't cover. There are more, but these are
    > the ones I can think of now that I think are quite important. ...


    Good list. About the last two points:

    > - Easy late binding in VB.NET (**)


    This is discussed in my copy (3rd ed. - Jan. 2002 -- nom. page 44, actual page
    49), where he explains to a reader that he didn't cover it because it only works
    with Option Strict turned off, which he recommends against doing. I'm with you
    that he should cover it in the main body of the text.

    > - The VB.NET With statement (**)


    Covered in my copy (3rd ed. - Jan. 2002 -- nom. page 22, actual page 27)

    > Also, I'm missing a section on the different features in the VS.NET
    > IDE - there are quite a few differences there.


    That, too would be helpful.

    Thanks for sharing your list.

    --
    Constance Petersen, DevX newsgroup section leader
    SoftMedia Artisans, Inc.
    http://www.smartisans.com
    For useful, usable software and Web sites
    Featured Web design: http://www.keweenawnow.com/
    --
    Please reply in the newsgroup so everyone can benefit




  9. #189
    Rob Teixeira Guest

    Re: From VB.net to C#



    You can always use line continuation

    -Rob

    "Thomas Eyde" <thomas.eyde@online.no> wrote:
    >....and I don't see the problem using method modifiers on a new line. Not
    >that I believe this change will ever be implemented.
    >
    >..Thomas
    >
    >"Ian R" <ianr@na.net> wrote in message news:3cb2b6ad@10.1.10.29...
    >> > I don't think this is the case (hint: Properties, Inherits on a second
    >> > line..). So please don't use inconsistence as an argument.

    >>
    >> But we're talking about modifiers on methods.
    >> VB6 uses implements on a different line so I see no problem with using
    >> inherits on a different line.

    >
    >
    >



  10. #190
    Jason Guest

    Re: From VB.net to C#


    >Nonsense. It is the simplest, easiest modern computer language that is
    >the most flexible (VB/VBScript/VBA), the most accessible (anyone of
    >average intelligence can learn it in 21 days), and the most successful
    >(at least 3 million programmers, plus countless millions of
    >end-users).
    >
    >MM


    There is also a "Learn C++ in 21 Days," "Learn Java in 21 Hours," and "Self-Administered
    Brain Surgery for Dummies." Okay, I made that last one up. But this is
    the first time I have ever heard ANYONE say that they could learn VB in 21
    days and really mean it. In reality, it can take years and lots of experience
    to be able to develop really good software with VB6, though it only takes
    a few minutes to create a form and put up a message box saying "Hello, World.".


    Mike, how the heck would you know if there were any simpler languages out
    there? Have you tried any? I'm currently up on VB6 (programming in it all
    day, in fact), C#, Java, JavaScript, and VBScript. I've programmed in languages
    such as C/C++, Pascal, Lisp, and Assembler in the past. There are a few
    more I am forgetting...

    Anyway, out of all of those, only C++ is harder than VB. If you don't agree,
    fine, but it just means you haven't had to do anything remotely difficult
    with VB. Now, to make a GUI, it's easier in VB than in Lisp, granted. But
    we are talking about the language, not the IDE.

    As far as end users go, there are a lot more end users who are routinely
    using C/C++ and Java based apps than there are Visual Basic apps. C++ is
    the basis for Windows and Word and Excel. Java is the basis for a whole
    boatload of web sites that people routinely visit. Most commercial software
    is, in fact, NOT written in VB.

    As far as 3 million users go, the numbers are dwindling. New development
    for servers is being done in Java or C++ (usually Java), and C#/VB.NET is
    starting to pick up. Recent desktop application development, at least for
    shrinkwrap stuff, is almost entirely C++. Game development is almost entirely
    C++. Visual Basic is left to the contractors for the relatively expensive
    RAD, small-user-base application. I still use VB6, although I like .NET
    better. You are entitled to your opinion, but I do wish you would keep it
    to yourself.

    The problem is that no one wants to have to install anything anymore. They
    don't want to have to distribute your app to 10,000 desktops every time you
    fix a bug (which could be daily). Any time something goes wrong with an
    installation, they have to manually track down the problem. It's a pain
    for administrators. So, they go to thin clients and Citrix clients. Or
    they run an application that is self-updating and secure. Now, tell me where
    VB6 fits into this scheme? The answer is nowhere.

    Microsoft is moving us to .NET because it is necessary for them to stay in
    business. VB6 programmers were moving to Java in droves. The VB6 programming
    paradigm is obsolete. The language is messy and difficult and painful, and
    the wrapper over Windows is severely limiting. The support for threading
    is a joke. The only things that VB does very well are GUI development and
    client database access, and it does those things VERY well. But heck, you
    can't even get a return code from a VB process, and what about STDIN and
    STDOUT?

    Mike, you go ahead and stick with VB6 as long as you want to. Just understand
    that when you make that decision, you have committed yourself to obsolescence
    in the marketplace.

    Good luck.

  11. #191
    Jason Guest

    Re: From VB.net to C#


    >Heard of Citrix Metaframe? That's how I see the future! Not from
    >Citrix, but from Microsoft. Your "PC" in the office, at home, in your
    >car, or in your pocket, is merely a display and input device with
    >minimal local CPU needs, i.e. just enough power to feed the display
    >and send your input to its host. Which is the Terminal Server (let's
    >just pretend and call it .Net Terminal Services) on a remote
    >supercomputer/mainframe/fast PC somewhere you're connected to via
    >broadband.
    >
    >MM


    Mike, you ignorant slut:

    Terminal services are very limiting. A network is not always available,
    and for CPU-bound applications, or applications that use a lot of RAM, a
    single server machine won't be able to serve many users. You are beginning
    to sound like an old mainframe guy! Get one person using a really high-end
    graphics package, and you bring the whole system to its knees.

    Not that terminal services does not have a place, but it is a silly way to
    do many things. In most cases, a web site will accomplish the same thing
    with a lot less fuss and a lot more portability.

    You can buy a computer that does a billion instructions in one second for
    under $600 new, especially with a bulk discount. Next year that will be
    over 1.5 billion. If you are going to remain connected to the internet at
    all times, which is required by terminal services, you may as well have a
    desktop. And if you have a desktop, you may as well distribute the CPU cycles
    rather than concentrating them all onto one machine. The performance and
    the overall responsiveness of the application is always going to be better
    if things are done locally.

    However, if you have a PDA or thin, portable machine, you can't really be
    assured of constant network connectivity. In that case, you need fat. You
    need a rich GUI and data synchronization. You need to be able to work offline.

    There is simply not enough bandwidth available using current technology to
    run thin-client software over cell phones, not for everyone all the time,
    so don't try to go the wireless route either. And my cell phone cuts off
    in certain areas anyway. Would I expect consistent service across the entire
    continent with a high-speed digital network? Not for at least 10 years.



  12. #192
    Jason Guest

    Re: From VB.net to C#


    kylix_is@yahoo.co.uk (Mike Mitchell) wrote:
    >On Mon, 8 Apr 2002 14:29:33 -0600, "Kathleen Dollard"
    ><kathleen@mvps.org> wrote:
    >
    >>................. VB.NET
    >>seems likely to focus on the millions of developers that used VB6 and will
    >>struggle with VB.NET.

    >
    >Hang about, that cannot possibly be! Jason and others keep telling me
    >that VB.Net is *simpler* than classic VB! How could those millions
    >possible be struggling? Wriggling, yes, but struggling? With such an
    >*easy* language as VB.Net?
    >
    >I'm perplexed!
    >
    >MM


    Well, there is a learning curve. It should not be a very big one, but some
    people will be so entrenched in a mindset that they can't do it. I mentioned
    the old mainframe programmers who could not learn VB in another post.

    It has nothing to do with the difficulty of the language. You can't learn
    VB.NET because you refuse to learn it, not because you are incapable. You
    have set up a mental block, and you'd rather die than learn anything new.


    "I do not like green eggs and ham..."

    Since you have not tried the green eggs, how would you know?

    I know a lot of C# (well, except for(x=0;...) apparently), and a little VB.NET,
    and I can tell you from experience that the language is not difficult for
    any *GOOD* VB6 programmer to learn. There is a learning curve, yes. If
    you struggle with the concepts, then you needed to be exposed to some additional
    languages anyway, and you weren't as good a programmer as you thought. If
    you just have to memorize a few syntactical differences, and get familiar
    with where things are in the framework, then you were a pretty good programmer
    in the first place. If you don't understand why .NET is *FAR* better than
    VB6 in almost all respects, then you are most likely among the former group
    and not the latter.

  13. #193
    Dan Appleman Guest

    Re: From VB.net to C#


    My Thanks to Constance for forwarding this to me.

    Naturally, there is always room for improvement, and I appreciate receiving
    this list which I will incorporate into the next edition.

    I do have a few comments:

    >
    >- out parameters in C#


    Not sure this is particularly important, but I'll mention it.

    >- The ability to write custom add/remove event accessors in C#


    What are you referring to here? VB.NET supports the AddHandler ability to
    dynamically add/remove event handlers. Is that what you mean?

    >- Escape characters and verbatim strings in C#


    Interesting tradeoff here. Escape characters do make it easier to build complex
    strings, but also easier to create bugs (how often have I forgetten that
    extra \ when building path names:-)

    >- The checked and unchecked operators in C#


    Needs to be added

    >- Exception filters in VB.NET


    I'll have to look into this - I thought C# had then also. If not, I'll add
    this.

    >- The as operator in C#


    Needs to be added

    >- C#'s using blocks (*)


    Needs to be added

    >- volatile fields in C# (*)


    This needs to be added.

    >- Easy late binding in VB.NET (**)
    >- The VB.NET With statement (**)
    >


    Both included in the current edition.

    >
    >* Might not have been implemented when he wrote the book, but there
    >has been plenty of time for him to include it on the updates page on
    >desaware.com.


    Like many things, time along isn't enough - it takes knowing about the issue,
    and this is the first time it has been brought to my attention - for which
    I am grateful.

    >
    >Also, I'm missing a section on the different features in the VS.NET
    >IDE - there are quite a few differences there.


    True - I did cover the issue of background compilation. But the question
    I have is this: which of the other features are clear productivity issues
    as compared to purely personal preference. I personally prefer VB.NET's code
    window ability to quickly add events and overrides. But it doesn't seem as
    important as the background compile issue.

    Anyway, I do welcome additional feedback.

    Dan

    >


  14. #194
    David Bayley Guest

    Re: From VB.net to C#

    Dan Appleman wrote:

    >> - The ability to write custom add/remove event accessors in C#

    >
    > What are you referring to here? VB.NET supports the AddHandler
    > ability to dynamically add/remove event handlers. Is that what you
    > mean?


    The event source is able to override the addition/removal of delegates by
    listeners. For example...

    public event EventHandler MyAutoEvent;

    public event EventHandler MyManualEvent {
    add { /*custom add code*/ }
    remove { /*custom remove code*/ }
    }

    IIRC, this was introduced in Beta2.

    --
    David.




  15. #195
    Mattias Sjögren Guest

    Re: From VB.net to C#


    >My Thanks to Constance for forwarding this to me.


    Yeah, thanks Constance! And thanks also to you Dan for dropping by.


    >Naturally, there is always room for improvement, and I appreciate receiving
    >this list which I will incorporate into the next edition.


    Good to hear that a new edition is coming. I'm looking forward to
    that.


    >>- The ability to write custom add/remove event accessors in C#

    >
    >What are you referring to here? VB.NET supports the AddHandler ability to
    >dynamically add/remove event handlers. Is that what you mean?


    Nope, what David said.


    >True - I did cover the issue of background compilation. But the question
    >I have is this: which of the other features are clear productivity issues
    >as compared to purely personal preference.


    Good question. I know there are some features that one language has
    that the other doesn't, but most of the time I guess it's just a
    matter of how you do things. The only real feature difference that
    comes to mind at the moment is that C# can strong name interop
    assemblies when you reference COM objects, but VB.NET can't (got to do
    it manually from the command line). I'm sure there are a couple of
    other things that I can't remember right now.


    >I personally prefer VB.NET's code
    >window ability to quickly add events and overrides.


    I prefer using the Class View for that myself. It saves a bunch of
    mouse clicks for implementing an interface. :-)


    >Anyway, I do welcome additional feedback.


    If I think of anything else, I'll mail you. Thanks again for joining
    the discussion.


    Mattias

    ===
    Mattias Sjögren (VB MVP)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center