-
Recent Posts
-
Recent Comments
- RodStephens on Use VBA code to pick random cells from the currently selected cells in an Excel workbook
- Riaan on Use VBA code to pick random cells from the currently selected cells in an Excel workbook
- Riaan on Use VBA code to pick random cells from the currently selected cells in an Excel workbook
- Riaan on Use VBA to randomize cells in Excel
- RodStephens on Use VBA to randomize cells in Excel
Archives
- 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
Tag Archives: syntax
Use the automatic code converters at developerFusion to convert C# code into Visual Basic, Ruby, and Python
The developerFusion web site provides code converters that let you translate between C#, Visual Basic, Ruby, and Python. One of the most important uses for reflection is analyzing code to figure out what it does. Once you know what the … Continue reading
Posted in programs, reflection, syntax
Tagged C#, C# programming, code conterver, code converters, convert code, example, example program, programs, Python, reflection, Ruby, syntax, translate code, VB, Visual Basic, Windows Forms programming
5 Comments
Implement interfaces explicitly or implicitly in C#
Suppose you create a class and in the declaration you indicate that it implements one or more interfaces. If you right-click an interface’s name, the dropdown displayed by Visual Studio includes an “Implement Interface” submenu. If you look at the … Continue reading
Understand ways to end case blocks in C#
There are several ways that you can exit case blocks in a switch statement. For example, consider the following code. string result = “”; int control = 1; switch (control) { case 1: case 2: result = “One or two”; … Continue reading
Posted in syntax
Tagged C#, C# programming, case, case blocks, case statement, example, example program, switch, switch statement, syntax, Windows Forms programming
2 Comments
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
Cast arrays from one reference type to another in C#
Every C# programmer knows that you can use a cast operator to convert one data type into another. For example, if the Employee class inherits from the Person class, then the following code creates an Employee object and then makes … Continue reading
Posted in arrays, syntax, variables
Tagged arrays, C#, C# programming, cast, cast arrays, casting, example, example program, override, syntax, variables, virtual, virtual method, Windows Forms programming
Leave a comment
Validate optional parameters in C#
The example Use named and optional parameters in C# explains how to use named and optional parameters to let the calling code omit any combination of parameters. In many applications, you may not want to allow the user to omit … Continue reading
Use named and optional parameters in C#
Optional parameters is one of the few additions in recent versions of Visual Studio that are really useful. I usually try to post examples in an older version of C# because it’s easier for someone to move an older example … Continue reading
Iterate over items in an array with unknown dimensions in C#
This example shows how you can iterate over the items in an array that has an unknown number of dimensions. When it starts, the program executes the following code. private void Form1_Load(object sender, EventArgs e) { string[, ,] values = … Continue reading
Posted in algorithms, arrays, syntax
Tagged algorithms, arrays, C#, C# programming, dimensions, example, example program, iterate, iterate items, loop over items, recursion, syntax, unknown dimensions, Windows Forms programming
2 Comments
Extract comments from a group of files in C#
I’m finishing up another book (I’ll announce it when it’s ready in a week or so) and I’m working through one of the thornier issues of any programming book: spell-checking code comments. I already have an example to extract comments … Continue reading →