.NET Binary Numbers


The following code snipit will get you all of the binary numbers from zero to fifteen:

string message = string.Empty;
for (int i = 0; i <= 15; i++)
{
   message += Convert.ToString(i, 2) + "\r\n";
}
MessageBox.Show(message);