473,378 Members | 1,067 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to make a kick start to C#?

SAM
Hi, can any one help me on a quick and efficent start in C sharp? please
help me out...

best regards,
Sam
Nov 16 '05 #1
6 1213
Hi SAM,

If you mean learning C# there are plenty of resources on the internet.
Just do a search for 'C#' and 'Tutorial'.

Basically, you need to put everything inside a class

public class MyClass
{
}

And you need a starting point. The first method that runs is called Main
(capital M)

public class MyClass
{
public static void Main()
{
// this is a comment and will be ignored by the compiler
// put your code here
}
}

If you are creating a windows program you need to create a class that
inherits from System.Windows.Forms.Form

public class MyClass : System.Windows.Forms.Form
{
public static void Main()
{
}
}

And in your Main method you need to call Application.Run with the
constructor of your class as a parameter.

public class MyClass : System.Windows.Forms.Form
{
public MyClass()
{
// this is the class constructor
// You typically create buttons etc here
// note the lack of a return type
// ie it should NOT be 'public void MyClass()'
}

public static void Main()
{
System.Windows.Forms.Application.Run(new MyClass());
}
}

Download the help files for .Net framework from msdn.microsoft.com (SDK)
and use your favourite text program (notepad is fine) to create code.

Once a codefile is created use csc.exe (found in
%windir%/Microsoft.Net/Framework/v1.1.4322/csc.exe or any other v?.? if
you install another version).

csc mycode.cs

will create mycode.exe

Also, you can add using statements to save typing

using System.Windows.Forms;

public class MyClass : Form
{
public MyClass()
{
}

public static void Main()
{
Application.Run(new MyClass());
}
}

This should get you started. Feel free to post questions on this
newsgroup when you are stuck or just curious about something (preferably
C# related) :)

--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #2
Hi Sam,

Not quite sure what it is exactly that you want? Are you looking for
example code, book recommendations?

Otherwise I recommend "using System;" would be a good place to start.
Nick

Nov 16 '05 #3
Hi Sam
there is Gotdotnot.com and you can also very helpful sample project with
a variety of topics on codeproject.com .also just from a previous post ,
check
checkout http://www.publicjoe.f9.co.uk. and you can always use the msdn
articles if you want details on specific point
Mohamed M .Mahfouz
Developer Support Engineer
ITWorx on behalf of Microsoft EMEA GTSC

Nov 16 '05 #4
Hi Sam,

There is a set of free lessons here:

http://www.csharp-station.com/Tutorial.aspx

Joe
--
http://www.csharp-station.com

"SAM" <ar********@venis-group.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Hi, can any one help me on a quick and efficent start in C sharp? please
help me out...

best regards,
Sam

Nov 16 '05 #5
On Wed, 12 Jan 2005 18:17:07 +0330, "SAM" <ar********@venis-group.com>
wrote:
Hi, can any one help me on a quick and efficent start in C sharp? please
help me out...

best regards,
Sam

I think there are three different approaches to this question
depending on who you are.

1. You've never written a program in your life before.

2. You've programmed in C, Visual basic or some other procedural
stuff, but never done any object oriented stuff.

3. Youve done object oriented programming in other languages such as
C++ and Java
I'm in the third group and am finding Jesse Liberty's Programming C#
quite handy, in conjunction with Kick Start Managed DirectX by Tom
Miller. Also Windows Forms programming with C# by Eric Brown I would
consider to be a must-have

Jessie Liberty has done a C# book called something like beginning C#
which is probably quite good, though I haven't read it myself.
There'll be plenty of reviews at amazon

If there is a C# for dummies, I'd be inclined to give it a miss. They
progress too slowly.

Kevin R
Nov 16 '05 #6
> I think there are three different approaches to this question
depending on who you are.

1. You've never written a program in your life before.

2. You've programmed in C, Visual basic or some other procedural
stuff, but never done any object oriented stuff.

3. Youve done object oriented programming in other languages such as
C++ and Java


I fall smack into category 2, and I've found "Microsoft Visual C# .NET Step
By Step" to be a great book for getting me up to speed on both C# and Visual
Studio .NET 2003.

HTH.

-Evan
Nov 16 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: John Lee | last post by:
Hi, I developed a scheduler as service and kick off another console application "DTSRUN.exe" to run a dts package ProcessStartInfo psInfo = new ProcessStartInfo(command); Process process =...
17
by: UJ | last post by:
Is there any way for a windows service to start a windows program ? I have a service that will need to restart a windows app if it needs to. TIA - Jeff.
8
by: C.Joseph Drayton | last post by:
Hi All, I am calling a PHP script that does an operation then sends back a result. I want JavaScript to wait until that result has been recieved. I am using the following code. What can I do to...
0
by: sikandarnandwani | last post by:
hi guys..im wondering how can i start a certain file that is declared as bytes by process.start or create process for it to run on memory in vb.net hope you guys can give me some light...im just...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.