469,656 Members | 1,815 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,656 developers. It's quick & easy.

local "static" variable

Hi,

Is there a way to define a local variable that retains it's value
between the function calls ?

Zeljko
Nov 15 '05 #1
3 1548
Is there a way to define a local variable that retains it's value
between the function calls ?


No, make it a field variable instead.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Nov 15 '05 #2
Field = variable at class level.

And make it a public property to access it in a clean way.
In article <OQ**************@TK2MSFTNGP12.phx.gbl>,
ma********************@mvps.org says...
Is there a way to define a local variable that retains it's value
between the function calls ?


No, make it a field variable instead.

Mattias

Nov 15 '05 #3
Hm.. OK, I thought there might be something simlar to VB6 static
keyword.

On Wed, 12 Nov 2003 12:28:33 +0100, Mattias Sjögren
<ma********************@mvps.org> wrote:
Is there a way to define a local variable that retains it's value
between the function calls ?


No, make it a field variable instead.

Mattias


Nov 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Richard Hayden | last post: by
6 posts views Thread by Kumar | last post: by
3 posts views Thread by Datta Patil | last post: by
3 posts views Thread by XPhaktor | last post: by
11 posts views Thread by comp.lang.php | last post: by
1 post views Thread by kiluyar | last post: by
14 posts views Thread by Jess | last post: by
2 posts views Thread by auspicious | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.