Results 1 to 4 of 4
  1. #1
    why06jz's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    295
    Reputation
    14
    Thanks
    54

    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.

  2. #2
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Luck. You will come to VB.NET after this :P

  3. #3
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    Not a chance, natural language programming makes me wanna cringe. I like my brackets too much {}.

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  4. #4
    broookliny's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    1
    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.