Omg Even Console apps are easier in C#.

Posts 1–4 of 4 · Page 1 of 1
Omg Even Console apps are easier in C#.
Gawd I miss good documentation, classified libraries, etc. Reminds me of Java libraries, so easy to use. and Fk Intellisense is so much more awesome when everything is in classes. Why does did Microsoft not use classes with statics for WinAPI?! \FP \fp! \FP!

[highlight=c#]
using System;

namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
FormatNumericalData();
Console.ReadLine();
}

static void FormatNumericalData()
{
Console.WriteLine("c format: {0:c}",99999);
Console.WriteLine("d format: {0:d9}", 99999);
Console.WriteLine("f format: {0:f5}", 99999);
Console.WriteLine("x format: {0:x}", 99999);
Console.WriteLine("X format: {0:X}", 100000);
Console.WriteLine("e format: {0:e}", 99999);
}
}
}
[/highlight]

Look out starting on that 3rd language!

I wonder if you can do a main method inside a class in C++, must find out... Oh and liking VS2010, even though I hated the load times at first. I might try coding some C++ with it too.
Luck. You will come to VB.NET after this :P
Not a chance, natural language programming makes me wanna cringe. I like my brackets too much {}.
I do it like this for example(for graphics):
Code:
public override void Main()
{
     DrawHouse(100, 350);
     DrawHouse(650, 350);
     DrawHouse(100, 700);
     DrawHouse(650, 700);
}
public void DrawHouse(int x, int y)
{
     DrawSkeleton(x, y);
     DrawRoof(x, y);
     DrawDoor(x, y);
     DrawWindow(x, y)
}
public void DrawSkeleton(int x, int y)
{
     Rect r = new Rect();
     r.X = x;
     r.Y = y-200;
     r.Width = 400;
     r.Height = 200;
     r.BrushColor = Color.MintCream;
     r.PenColor = Color.Black;
     AddRect(r);
}
Then the same for roof door and window.
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Talk with us