Can anyone tell me what is the best way to declare and initialize variables to be used in a Windows form at file level (to be used by the form where the variable is declared) and at global level (to be used by several forms). I’ve been declaring variables under ‘Required designer variable’ as shown below and initializing the variables in Page_Load event (I don’t want to mess around with the form’s constructor as it causes the designer window not to function). I would be very grateful.
private:
///
/// Required designer variable.
///
vivek kulkarniPosted Feb 25, 2009, 4:29 PM
Hi,
There is a document on the net which you can refer.
http://www.dotnetspider.com/tutorials/BestPractices.aspx
C# Coding Standards and Best Programming Practices
Best Practices of Coding
http://www.c-sharpcorner.com/UploadFile/akrao/CodingPractices11182005011444AM/CodingPractices.aspx
Hope this helps.! Please let me know if you require anything else.
Thank you,
Vivek Kulkarni
MCP MCAD.Net