![]() The above code centers a string message in a Form's OnPaint method. SizeF msgSize = g.MeasureString(message, this.Font) String message = '.NET Compact Framework' Protected override void OnPaint(PaintEventArgs e) To illustrate this feature, I will use the following simple method: ![]() For languages which do not support multi-line comments, this saves a lot of time. While that is a fast / easy way to comment out a block of code, this is even easier, especially when I discover that I already have a multi-line comment block within the code I wish to disable. For years, I've been a C/C++/C# multi-line comment person, manually adding /* and */ around any code I wanted to temporarily remove. I asked him what he just did and he introduced me to the handy comment / uncomment buttons. We were looking at some code and he selected a line, clicked a button, on the toolbar, and the line was commented out. Yesterday, I was talking with one of the folks here and I learned something about Visual Studio.
0 Comments
Leave a Reply. |