Though we have seen that the skype application was introduced in Iphone and Android apps , it still had to debut in the java app world. The good news is that it has; check out the snapshots on the right:
The application allows you to use skype the way would from a PC, where you can chat and do a voice calling , however for voice calling you need to be connected to WI-FI, which is not different from the applications from Iphone and Android world.
A Simple C# Program
Saturday, January 30, 2010
In this article i will be explaining the following:
1. How to run a C# program through the command-line compiler.
2. Explanation of the C# program.
1. How to run a C# program through the command-line compiler.
[Please Note i have assumed that you have .net framework/visual studio installed on your machine]
(a) Create a folder called MyFolder in C drive of your computer
(b) Open a notepad and paste the following code:
Using System;
namespace MyProgram
{
class MyClass
{
static void Main()
{
Console.WriteLine("This is an output from a C# program.")
}
}
}
(c) Save the file as MyProgram.cs in C: drive.
(d) Now go to Start>All Programs>Microsoft Visual Studio 2005>Visual Studio Tools>Visual Studio 2005 Command prompt.
(e) Type cd\ at the command prompt. This will bring you at c:\> prompt
(f) Now type cd MyProgram. You will be at c:\MyProgram. Type csc MyProgram.cs.
(g) This compiles the c# code file to produce a MyProgram.exe.
(h). At c:\MyProgram> type MyProgram ie it should look : c:\MyProgram>MyProgram and then press enter. You will get the output-> This is an output from a C# program.
2. Explanation of the C# program.
(a) Using System: This line informs the c# compiler that the program refers to System namespace which consists of classes like Console which will be used by the program later.
(b) namespace MyProgram: Declares a new namespace to group type declarations we are going to define under this name.
(c) class MyClass: Type Declaration of type MyClass. With this you can create instances of type MyClass.
(d) static void Main() : Declaration of a class member Main() which is a special function interpreted by the C# compiler as the starting point of the program.
(e)Console.WriteLine("This is an output from a C# program.") : This statement uses a class called Console defined in System namespace. The Console has a Writeline member which outputs the text to programs console window, appending a newline character at the end of the string.
1. How to run a C# program through the command-line compiler.
2. Explanation of the C# program.
1. How to run a C# program through the command-line compiler.
[Please Note i have assumed that you have .net framework/visual studio installed on your machine]
(a) Create a folder called MyFolder in C drive of your computer
(b) Open a notepad and paste the following code:
Using System;
namespace MyProgram
{
class MyClass
{
static void Main()
{
Console.WriteLine("This is an output from a C# program.")
}
}
}
(c) Save the file as MyProgram.cs in C: drive.
(d) Now go to Start>All Programs>Microsoft Visual Studio 2005>Visual Studio Tools>Visual Studio 2005 Command prompt.
(e) Type cd\ at the command prompt. This will bring you at c:\> prompt
(f) Now type cd MyProgram. You will be at c:\MyProgram. Type csc MyProgram.cs.
(g) This compiles the c# code file to produce a MyProgram.exe.
(h). At c:\MyProgram> type MyProgram ie it should look : c:\MyProgram>MyProgram and then press enter. You will get the output-> This is an output from a C# program.
2. Explanation of the C# program.
(a) Using System: This line informs the c# compiler that the program refers to System namespace which consists of classes like Console which will be used by the program later.
(b) namespace MyProgram: Declares a new namespace to group type declarations we are going to define under this name.
(c) class MyClass: Type Declaration of type MyClass. With this you can create instances of type MyClass.
(d) static void Main() : Declaration of a class member Main() which is a special function interpreted by the C# compiler as the starting point of the program.
(e)Console.WriteLine("This is an output from a C# program.") : This statement uses a class called Console defined in System namespace. The Console has a Writeline member which outputs the text to programs console window, appending a newline character at the end of the string.
Subscribe to:
Posts (Atom)