David Ferguson [mailto:[EMAIL PROTECTED]] wrote:

> How do I declare a static variable in a member function in C#?

Function level static declaration isn't supported by C#. You'll have to make
it a member of the type.

Check out this section[1] of the SDK for more info, specifically:

<snip>
It is not possible to use this to reference static methods or property
accessors.
Note   The static keyword is more limited in use than in C++. To compare
with the C++ keyword, see static in the C++ Language Reference.
</snip>

HTH,
Drew

[1] ms-help://MS.VSCC/MS.MSDNVS/csref/html/vclrfStaticPG.htm

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to