Re: Two things that bug me about C#
From: Rakesh Rajan (rakesh-no-spam-rajanhere_at_hotmail.com)
Date: 09/25/04
- Next message: Rakesh Rajan: "Re: Interface-based programming"
- Previous message: mb: "Two things that bug me about C#"
- In reply to: mb: "Two things that bug me about C#"
- Next in thread: Jochen Kalmbach: "Re: Two things that bug me about C#"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 25 Sep 2004 22:26:00 +0530
Hi mb,
Instead of having global variables disorganized by being "all around", you
could organize your global var's in a more formal class. In C++ etc. , you
will have one BIG chunk of global variables.....here couldn't you have more
organization? It's the same case with methods as well.
In C#, everything is within a class, and everything derives from
System.Object...this arch is nicely added on with that arch as well.
HTH,
- Rakesh Rajan
"mb" <mm@hotmail.com> wrote in message
news:OuUxiyxoEHA.1816@TK2MSFTNGP09.phx.gbl...
> 1) you can't declare anything outside of a class, enum, etc. Thus you
can't
> declare globals right after the namespace declaration. I just don't
> understand why Microsoft decided to do away with easy to
> use/declare/understand global variables. Even C++ can do this. I used to
> put globals all in one spot for easy maintaining, this is intuitive. Now
> they are spread all over the code, in different classes as "static"
> variables, which to access I have to write out the full class and veriable
> name.
>
> 2) Almost along the same lines, I can't just create a function, I have to
> create a class first, and thus waste time and space. Then if I don't make
> the function static, I have to instantiate the class just to use the
> function.
>
> This is just my lowly opinion as a beginning C# programmer.
>
>
- Next message: Rakesh Rajan: "Re: Interface-based programming"
- Previous message: mb: "Two things that bug me about C#"
- In reply to: mb: "Two things that bug me about C#"
- Next in thread: Jochen Kalmbach: "Re: Two things that bug me about C#"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|