Activity Stream
48,167 MEMBERS
6751 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31
  1.     
    #1
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com

    Default C# help (jayfella / hyperz)

    heya guys, i need some help in C#

    Recently been learning it as you know but heres the problem i have

    When Using Visual Studio how do i create a small application and execute it within the CMD Area.

    Because it starts with a "Form" as basic.

    If you can just let me know how to create a simple hello world application and execute it within CMD as an exe would be HUGE Help

    Thanks in advanced
    litewarez Reviewed by litewarez on . C# help (jayfella / hyperz) heya guys, i need some help in C# Recently been learning it as you know but heres the problem i have When Using Visual Studio how do i create a small application and execute it within the CMD Area. Because it starts with a "Form" as basic. If you can just let me know how to create a simple hello world application and execute it within CMD as an exe would be HUGE Help :) Rating: 5
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  2.   Sponsored Links

  3.     
    #2
    Respected Member
    You have to create it as a console application I think.
    "Maybe this world is another planet's Hell"

  4.     
    #3
    Member
    Website's:
    Wrestle-Zone.net Media-Zone.net
    wWw.Wrestle-Zone.net
    WrestlinG & WareZ

    A$$HOLE: To0

  5.     
    #4
    Banned
    mare for console..use C++..C# console is shit..u hve to type loads..

    C++ is awsome..xd

  6.     
    #5
    Respected Developer
    Sniper, you're an idiot for saying that no offense. You do realize they both use Win32 under the hood? And that you can do the exact same stuff with C# as you would with C++ but with less code? Seriously...

    @Lite, as others said, create a console application.

  7.     
    #6
    ლ(ಠ益ಠლ)
    Website's:
    extremecoderz.com
    lmfao @sniper. here - ill make one for you.

    PHP Code: 
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    namespace 
    ConsoleApplication3
    {
        class 
    Program
        
    {
            static 
    void Main(string[] args)
            {
                
    DoWork("hello world.");
            }

            static 
    void DoWork(string input)
            {
                
    Console.WriteLine(input);
                
    Console.WriteLine("hello again!");
                
    Console.Read();
            }
        }


  8.     
    #7
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    Ok net me just get this straight.

    void = does not return anything
    the function Main is a constructor.
    Console.WriteLine sends text to the CMD
    Console.Read() waits for a user input. ?

    and no matter the class named Program is executed first ?
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  9.     
    #8
    ლ(ಠ益ಠლ)
    Website's:
    extremecoderz.com
    indeed.

    you can also do:

    PHP Code: 
    static object[] myObject(string input)
    {
    // blah blah
    // do some stuff
    return new object "some""stuff""here" };
    }

    static 
    void hello()
    {
    object[] myNewObject myObject("testing");

    int test myNewObject.Length//get the size of the array
    string a myNewObject[0];
    string b myNewObject[1];
    string c myNewObject[2];


  10.     
    #9
    Respected Developer
    void = returns nothing
    Main = the program's "entry point" (where the execution begins)
    Read(); = reads a char and pause the console preventing it from instantly closing
    Static = members/functions are accessible globally without having to new up an instance of the class

  11.     
    #10
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    ok but do the objects HAVE to be static ?

    in PHP This means that the object does not need to be initiated but you cant use the special variable $this / this ??

    hyper Answered thanks all, im getting there
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


Page 1 of 4 123 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Hyperz.. I need your help.
    By R4Z0R3 in forum Technical Help Desk Support
    Replies: 0
    Last Post: 4th Jun 2010, 05:25 AM
  2. Hyperz.. I need your help.
    By R4Z0R3 in forum Technical Help Desk Support
    Replies: 8
    Last Post: 3rd Jun 2010, 02:52 AM

Tags for this Thread

BE SOCIAL