Can I delcare static variable in C# ?? I looked into the help , it says do this but gave me an error :
static System.Data.DataSet ds;
what's wrong ?:rolleyes:
Printable View
Can I delcare static variable in C# ?? I looked into the help , it says do this but gave me an error :
static System.Data.DataSet ds;
what's wrong ?:rolleyes:
What error?
It says expected error ?? I don't why ?
I am assuming you are trying to decalre static at the function scope, I think you can only declare static variables at the class scope ie
Code:public class myclass
{
static string mystr;
}
But I need it inside a function , it's possible , isn't ?:rolleyes:
Weird , it's working when it's outside the function ??? In VB I can declare it anywhere !!!!
Not that I can tell. At any rate, it will still do that same job at the class scope.
C# is more bitchy than VB. :p
lol , yes it is . Is this conversion right ?Quote:
Originally posted by Cander
C# is more bitchy than VB. :p
VB.NET
If ds Is Nothing
C#
if (ds ==null)
{
}
??
yes that is correct.
yessssssss , Now I'm done with my database dll C# version .
:p
Thank you Cander !
;)