Skip to content

Global Variable in C#

hiamitforu

Asked Jan 12, 2006, 12:57 AM EST1 answer
Share
LinkedInX
Dear Sir, I want to make such function which could be call every window form.. how to make globle connection in C# so that i call this function in forms as per my requirment plz Help me out Regards, Amit

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0

    Hi,

    Delcare one variable as public static in first form of the your application. use this variable throughout ur application. You can declare SqlConnection object as public staic, use this globally

    0