-
Recent Posts
-
Recent Comments
- RodStephens on Calculate hash codes for a file in C#
- A wellwisher on Calculate hash codes for a file in C#
- pappalapub on Find rectangles defined by a side and aspect ratio in C#
- RodStephens on Find rectangles defined by a side and aspect ratio in C#
- pappalapub on Find rectangles defined by a side and aspect ratio in C#
Archives
- February 2021
- January 2021
- December 2020
- November 2020
- October 2020
- September 2020
- August 2020
- July 2020
- June 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- October 2019
- September 2019
- August 2019
- July 2019
- June 2019
- May 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- September 2018
- August 2018
- July 2018
- June 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- September 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- February 2014
- January 2014
- December 2013
- October 2013
- August 2013
- June 2013
- December 2012
- September 2012
- July 2012
- June 2012
- November 2011
- May 2011
- April 2011
- February 2011
- December 2010
Categories
- .NET
- 3D
- 3D graphics
- ADO.NET
- algorithms
- animation
- API
- arrays
- attributes
- audio
- books
- C#
- C# programming
- calculations
- challenges
- classes
- clipboard
- coding
- combinatorics
- console
- controls
- cryptography
- curve fitting
- database
- debugging
- dialogs
- directories
- Drag and Drop
- drawing
- drawings
- enums
- Event
- events
- example program
- Excel
- extension methods
- extensions
- files
- finance
- fonts
- formatting
- forms
- fractals
- ftp
- games
- GDI+
- generic
- geometry
- globalization
- graphics
- html
- IDE
- image processing
- inheritance
- interfaces
- internationalization
- internet
- interoperability
- LINQ
- lists
- localization
- mathematics
- memory
- menus
- MessageBox
- methods
- miscellany
- multimedia
- network
- Office
- OOP
- operators
- parsing
- performance
- phone
- PowerPoint
- printers
- printing
- productivity
- programs
- puzzles
- recursion
- reflection
- registry
- regular expressions
- serialization
- settings
- SQL
- stories
- strings
- syntax
- system
- threading
- three-dimensional graphics
- tips
- tools
- transformations
- Uncategorized
- user interface
- variables
- VBA
- web
- Windows Forms programming
- WMI
- Word
- wpf
- XAML
- XML
Meta
Category Archives: coding
Understand region directives in C#
Region directives let you define sections of code that you can collapse and expand by clicking the – and + signs to the left in the code window. Each region directive should have a corresponding endregion directive. You can include … Continue reading
Posted in coding, syntax
Tagged C#, C# programming, coding, endregion, endregion directives, example, example program, Region, region directives, syntax, Windows Forms programming
3 Comments
Disable Visual Studio warnings in C#
Visual Studio warnings let you know when your code contains something suspicious. For example, suppose you have XML documentation enabled. To enable XML documentation, open the Project menu and select Properties. On the Build tab, check the XML Documentation File … Continue reading
Define custom exception classes in C#
The example Throw a standard exception in C# explains how to throw exceptions to tell the program about unexpected errors. The example See a hierarchy of exception classes for use in C# lists some useful exception classes. But what if … Continue reading
See a hierarchy of exception classes for use in C#
The example Throw a standard exception in C# explains how to throw exceptions to indicate a problem in a program. Throwing an exception is easiest if you can find an existing exception class that correctly represents your situation. The following … Continue reading
Throw standard exceptions in C#
The example Use try catch blocks to protect against unexpected errors in C# explains how to catch an exception and briefly mentions that you can use the throw statement to throw your own exception. This example shows how to throw … Continue reading
Posted in coding
Tagged C#, C# programming, coding, example, example program, exception, exception classes, exception handling, exceptions, try catch, try catch block, Windows Forms programming
2 Comments
Remove unnecessary using directives in C#
The top of a C# code file usually includes series of using directives to tell Visual Studio which namespaces are used by the code. When you first create a project, the code files include lots of using directives that might … Continue reading
Posted in coding, performance
Tagged C#, C# programming, coding, directive, example, example program, performance, using, using directives, Windows Forms programming
Leave a comment
Tip: Make parentheses matching more visible in C#
Recently someone asked me if there was a Visual Studio add-in that highlighted parentheses, brackets, and braces so it would be easier to tell which closing parenthesis matched which opening parenthesis. It turns out that Visual Studio already has a … Continue reading
Posted in coding, miscellany, tips
Tagged C#, C# programming, coding, example, example program, miscellany, parentheses matching, tips, Windows Forms programming
1 Comment
Use preprocessor directives in C#
Technically C# actually doesn’t have a true preprocessor, but it treats these statements as if they were preprocessor directives. These statements tell C# about how to process pieces of code. The directives are: #if Tests a Boolean value at compile … Continue reading
Posted in coding, syntax
Tagged #endif, #if, C#, C# programming, coding, example, example program, preprocessor directives, syntax, Windows Forms programming
Leave a comment