D
damiensawyer
Hi,
I have some old VB.NET code that I'm converting to C#. Some of it uses
the STATIC keyword. Can someone please tell me how to do this in c#?
Please note, this does NOT do what static in c# syntax does.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vakeystatic.asp
In VB, static is a way to let a variable defined locally to a method,
keep it's value between calls to that method. I 'could' use a private
property inside the class, however, the advantage of vb's static is
that the variable is scoped only to the method in which it resides.
Thanks very much for your help
Damien Sawyer
I have some old VB.NET code that I'm converting to C#. Some of it uses
the STATIC keyword. Can someone please tell me how to do this in c#?
Please note, this does NOT do what static in c# syntax does.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vakeystatic.asp
In VB, static is a way to let a variable defined locally to a method,
keep it's value between calls to that method. I 'could' use a private
property inside the class, however, the advantage of vb's static is
that the variable is scoped only to the method in which it resides.
Thanks very much for your help
Damien Sawyer