Does making a method static in C# improves its performance?
116814
No, it doesn't improve the method's performance but only substracts a hidden argument from the list. \n'static' is a semantic construct, by which you mean that a certain method belongs to the class, or it doesn't need internal data to deal with.\n\nOn the other side, if you care about 'calling' performance (again, not the performance of the method itself) then consider not using virtual methods unless really necessary. That should decrease calling overhead (virtual calls go through a vtable) a tiny little bit, which makes sense for functions that are called inside loops or the like.
476724
There's no appreciable difference in the performance of ASP.NET 2.0 versus 1.1.\n\nHowever, you need to keep pace with changes in the .NET Framework; eventually, Microsoft will stop supporting older technologies.\n\nASP.NET 2.0 has a significantly better collection of layout controls; has very useful, cross-platform navigation controls; has significantly more convenient methods of data access and display; makes it far easier to create custom components and handlers; and has simplified many of the more common controls, such as those used for input and data handling.
1050154
.Net has a lower threshold for entry into the field. If you pursue mainframe type development you will encounter many individuals with significantly more experience than you.
975053
in it's simplicity the .net framework takes the code you write and compiles it to an intermidiate language.  The .net framework can then take this code and convert it to run on any system (as long as the framework is installed)  This gives the advantage of portability.
249182
Final just means that the method (or variable) it refers to cannot be modified on s subclass. It is actually redundant on a static anyway because statics are never part of an oject instance.
1034291
is this ASP.NET?\n\ntry creating a function wrapper that verifies that an object is active before firing the event, if the event is being fired before the page is loaded it doesn't have the DOM to locate the control
25915
According to Object Oriented Design, you really shouldn't expose class properties directly. The task you're trying to accomplish can be done by using accessors with no Set method, ie. in this way:\n\nnamespace abc\n{\npublic class AbcData\n{\nprivate const string str = "xyz";\n\npublic string AbcString\n{\n   get { return str; }\n}\n}\n\n}\n\nIn this way, you're hiding str, and exposing it using the Get Accessor method.
608760
Yes. VB6 is much a better language than the lame VB.NET. I don't say this out of nothing, the proof is listed down here and they are not even a complete list. \n\n- VB.NET is often quoted as not a worthy enough to be VB6 succesor, due to its (very) poor backward compatibility, making it almost the same as new language. Even Microsoft admit this by having their motto for the language "The Difference is Obvious", yeah it's obvious since it's basically a different language, with some minor extra feature and majorly crippled.\n- VB.NET's compiled code can be decompiled easier than VB6's because it uses Intermediate Language, and not a direct comilation into Machine Code\n- VB.NET runtime is approx. 10 times larger than VB6 runtime, making  programs need a much larger memory demand. This useless overhead is a significan disadvantage.\n- It have been proven that some of the changes are NOT needed for the language to comply with either CLR (Common Language Runtime) nor .NET framework. These changes are suspected to be because the people that develops VB.NET wanted to selfishly create something that is more similar to their own language than the original Basic.\n- Most of VB6's greatest feature is missing. Some has been restored at future version of VB.NET, like the Edit And Continue feature, but until now, I haven't seen control arrays in VB.NET. There is a solution for Control Arrays substitution, that they say is simple, but in fact, the lies is obvious, it is NOT SIMPLE AT ALL, in fact they're very complicated and complex. In VB6, CA is made in design time, in VB.NET, there is no way to make it in design time, you had to create a CA in runtime, which is very not simple.\n- VB.NET IDE crashes all the time, VB6 IDE is much more stable. 10% of the time I (just) opened the VB.NET IDE, it crashes, and 60% of the succeded one crashes afterward, just after I instructed the IDE to create a new project.  Finally, it would crashes 90% of the time while I was working on the code. I have never get any crashes on VB6 eve for once in my entire life.\n- VB.NET codes are generally longer and need more work to type than the same thing done in VB6\n- There is no Data Type Currency. And there is no substitution either.\n- This new language claiming the name VB, have much difference but is too similar enough to be confusing people that have mastered the VB6.\n- VB6 to VB.NET's code converter is suck enough to introduce new bugs that is purely inexistent in the original code.\n- Converting code to VB.NET makes much more loss than profit that you can get.\n- VB.NET syntax isn't in sync with VB6's spirit.\n- VB6 is already fully Object-Oriented Language in 'concept'. Most people don't think so though, but it is 'conceptually' OOP, just because it doesn't follow some of the rules of OO doesn't mean it isn't an OO language.\n\nMS tried to patent the keyword IsNot, this is stupid, since patenting it might mean we cannot lawfully use the keyword.\n\nALL IF NOT MOST OF THESE ARGUMENTS  IS BACKED BY WIKIPEDIA IN THE ARTICLE: http://en.wikipedia.org/wiki/Visual_Basic_.NET\nOR MSDN (Microsoft Developer Network, a.k.a Microsoft undignified way of creating money by selling products without help file in VB6, their sin is already released a bit in VB.NET by having an unhelpful help file in VB.NET)
616514
Generating static electricity.
35090
Elflemming is correct.\nWhen you run the class state it is loaded in JVM. Then when you use Example class it is then loaded on JVM. Keep in mind, no instance is created, only class is loaded.\nWhenever you use a class for first time JVM loads it . When loading class it initializes all static variable and executes static initializer.( If exists.)\nSo no instance of exaple class will be created.
817515
Is your object class the one that manage both creation and destruction of instances? \n\nYou could have both a static Create method and a static Destroy method.  Destroy would push instances into an 'unused instances' stack and Create would pop the first instance of that stack and assign new values to it as needed.\n\nThat way you save memory allocation/desallocation.
1046273
Of course you can.  If you call the public static void main(String args), be aware of a never ending loop.
1036603
yes you can define s function with named as main but it sould not be static
819042
is this a homework problem!? :)\n\ni haven't written C++ in a while but it seems like a fairly straight forward problem.  take a look at creating classes with static members and you'll be headed in the right direction.
68252
Manish it hardly matters if you choose either of them. Finally the code is compiled into IL which is the intermediatory language. If you are comfortable with VB U go for VB.NET if your background is C/C++ go for C#.NET. My personal opinion is VB.NET is much easier to work with.
180305
C# is actually a lot more like Java than it is C++.  They are both object-oriented languages, but C#, like Java, is designed to be compiled to "byte code" rather than an native application (that is, one that will run without the .Net framework).  Most C++ compilers create native applications.\n\nC# also handles memory management issues for you, so you are not required to keep track of what memory you have allocated.  However, it does not guarantee for you when exactly your objects will be destroyed, which can be a pain in some circumstances.
673244
Function overloading doesn't affect a programs execution speed in any way because the overloads are resolved at compile time which is virtually free.\nIt makes your program more understandable. Take an example.\nYou want to convert an integer into its equivalent ascii representation. There are many integral types in every major language (C++, Java, C#, VB.Net). Tell me what would you like to have:\nchar* itoa(int);\nchar* ltoa(long);\nchar* stoa(short);\nchar* lltoa(long long);\n\nor the simplified versions:\n\nchar* itoa(int);\nchar* itoa(long);\nchar* itoa(short);\nchar* itoa(long long);\n\n?