Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 3rd, 2008, 09:54 AM
Authorized User
 
Join Date: Jan 2008
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Doom
Default Starting off are C# application

am i right in saying that you always start of a c# console application with a class.

Also whats is the differnet between visual c# and c#

thanks.

  #2 (permalink)  
Old January 3rd, 2008, 10:04 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

A console application starts with a class, correct, but the class must contain the static Main method. The class used to start the application can be changed in the project properties.

C# is the programming language. Visual C# usually refers to the free version of Visual Studio Express which you can only use C# with, but some people also use it to refer to general use of C# inside any version of Visual Studio.

/- Sam Judson : Wrox Technical Editor -/
  #3 (permalink)  
Old January 3rd, 2008, 03:31 PM
Authorized User
 
Join Date: Jan 2008
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Doom
Default

so am i right in saying that you can not write any code outside of a class.

  #4 (permalink)  
Old January 3rd, 2008, 04:50 PM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Not really no. VB.Net has something called Modules, but even these are just kind of hidden classes really.

Why do you ask? What is it you are trying to do that you can't work out?

/- Sam Judson : Wrox Technical Editor -/
  #5 (permalink)  
Old January 3rd, 2008, 05:33 PM
Authorized User
 
Join Date: Jan 2008
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Doom
Default

i am just trying to understand on how to structure my code.

  #6 (permalink)  
Old January 3rd, 2008, 05:50 PM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Well Visual Studio 2005 creates a class called "Program" which contains the "Main" method which is required for a console application. This should probably then just create an instance of your worker class, or alternatively call its static methods to perform the actions.

/- Sam Judson : Wrox Technical Editor -/
  #7 (permalink)  
Old January 3rd, 2008, 06:08 PM
Authorized User
 
Join Date: Jan 2008
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Doom
Default

will do, thanks for you help.

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
starting problem kanoorani ASP.NET 2.0 Basics 4 July 18th, 2007 10:50 PM
Starting XML kalyanRavula XML 4 October 3rd, 2006 07:39 AM
Error starting a new web application arun_sunmic Apache Tomcat 0 March 19th, 2006 10:35 AM
Just starting... lozbritt9 C++ Programming 1 March 10th, 2006 12:54 PM



All times are GMT -4. The time now is 06:08 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.