Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 3rd, 2008, 09:54 AM
Authorized User
 
Join Date: Jan 2008
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.

 
Old January 3rd, 2008, 10:04 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
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 -/
 
Old January 3rd, 2008, 03:31 PM
Authorized User
 
Join Date: Jan 2008
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.

 
Old January 3rd, 2008, 04:50 PM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
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 -/
 
Old January 3rd, 2008, 05:33 PM
Authorized User
 
Join Date: Jan 2008
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.

 
Old January 3rd, 2008, 05:50 PM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
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 -/
 
Old January 3rd, 2008, 06:08 PM
Authorized User
 
Join Date: Jan 2008
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Doom
Default

will do, thanks for you help.






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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.