Monthly Archives: March 2008

Split a text file into several files using C#

Recently I needed to split a text file into several small parts, where each file should have a maximum of 100 lines each (all lines had the same length).

Posted in .NET | Tagged , | Leave a comment

Get line and column number of the cursor position on a RichTextBox

Recently I needed to get the line and column numbers based on the position of the cursor inside a RichTextBox control, in a Windows Forms project.

Posted in .NET, Windows Forms | Tagged , , , , | Leave a comment

CSharp: Assign ‘null’ to variables of type int, decimal, DateTime, and other value types

In .NET we have two kinds of types: Value types and Reference types.

Posted in .NET | Tagged , | Leave a comment