Results 1 to 10 of 31
-
24th Jun 2010, 07:04 PM #1OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.comC# 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 advancedlitewarez 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: 5Join 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
-
24th Jun 2010, 07:06 PM #2Respected Member
-
24th Jun 2010, 07:23 PM #3MemberWebsite's:
Wrestle-Zone.net Media-Zone.net
-
24th Jun 2010, 07:26 PM #4Banned
mare for console..use C++..C# console is shit..u hve to type loads..
C++ is awsome..xd
-
24th Jun 2010, 07:44 PM #5Respected 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.
-
24th Jun 2010, 07:44 PM #6ლ(ಠ益ಠლ)Website's:
extremecoderz.comlmfao @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();
}
}
}
-
24th Jun 2010, 07:52 PM #7OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.comOk 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
-
24th Jun 2010, 07:56 PM #8ლ(ಠ益ಠლ)Website's:
extremecoderz.comindeed.
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];
}
-
24th Jun 2010, 07:57 PM #9Respected 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
-
24th Jun 2010, 07:59 PM #10OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.comok 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 Answeredthanks 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
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Hyperz.. I need your help.
By R4Z0R3 in forum Technical Help Desk SupportReplies: 0Last Post: 4th Jun 2010, 05:25 AM -
Hyperz.. I need your help.
By R4Z0R3 in forum Technical Help Desk SupportReplies: 8Last Post: 3rd Jun 2010, 02:52 AM
themaCreator - create posts from...
Version 3.45 released. Open older version (or...