C#.net windows application

Since I am new to c#.net 2008 but I have worked a little with visual 
basic.net 2005, I have the following questions I would like to ask: 
1. When I am looking at a .sln file that I will be maintaining a work, I can 
see there are lots of static void Main() methods in a file called program.cs 
throughout the solution in separate folderts. Can you tell me the purpose of 
this kind of code? Does this instantiate an object, is this a class libary 
member? 
2. When running the C#.net 2008 professional version windows application, 
how do I know which 'main' method is being called? 
3. When looking at this sln, I would like to determine all the different 
ways to run this .sln application there are. To do this would I look at the 
different ways there are to run the application (release, debug, configuation 
mange), would I use the object explorer? How would you recommend I learn how 
this .sln is executed 
0
Utf
5/31/2010 4:42:01 AM
dotnet.languages.csharp 1931 articles. 0 followers. Follow

1 Replies
1283 Views

Similar Articles

[PageSpeed] 8

jazzydance wrote:
> Since I am new to c#.net 2008 but I have worked a little with visual 
> basic.net 2005, I have the following questions I would like to ask: 
> 1. When I am looking at a .sln file that I will be maintaining a work, I can 
> see there are lots of static void Main() methods in a file called program.cs 
> throughout the solution in separate folderts. Can you tell me the purpose of 
> this kind of code? Does this instantiate an object, is this a class libary 
> member? 

You appear to have the same Internet identity as "Wendy Elizabeth".  Are 
you?  If so, why are you posting a question almost identical to the 
previous one you posted?

To add to my previous answer (since you didn't mention solutions in your 
previous question): a single solution can refer to two more projects, 
any of which can be an application.  Each application project will have 
its own entry point, defined as a Main() method in some class (but in 
the Program class by default).

When debugging a solution, only one project can be the current "startup 
project", which you can choose by selecting in the Solution Explorer, 
right-clicking and selecting the menu item "Set as Startup Project" (or 
something like that…I forget if that's the exact wording).

Of course, when running each application outside of the debugger, you 
can choose whichever specific application you want to run, and each will 
work according to whatever its project settings were.

> 2. When running the C#.net 2008 professional version windows application, 
> how do I know which 'main' method is being called? 

One way to do it is open the solution and the press the F10 key, which 
will single-step into the startup project's entry point.

Without debugging, you would have to look to see which project is the 
startup project for the solution (it will be the project displayed with 
a bold font name in the Solution Explorer), and then look at that 
project's properties to see which class is the startup object for the 
project.  The Main() method in that class is the entry point for the 
project.

> 3. When looking at this sln, I would like to determine all the different 
> ways to run this .sln application there are. To do this would I look at the 
> different ways there are to run the application (release, debug, configuation 
> mange), would I use the object explorer? How would you recommend I learn how 
> this .sln is executed 

You don't execute a Solution per se, though as I mentioned, a Solution 
does have a current startup project.  It's the project that is executed, 
and that can change if there are more than on executable projects in the 
Solution.

Configuration Manager can show you all the different configurations 
configured for the Solution (noting, of course, that each project can 
have its own possible build configurations which may or may not be 
identical to those for the Solution, though normally one tries to keep 
the Solution and project configurations in sync with each other).

Beyond that, it's simply a question of what project is the current 
startup project, and what class within that project is the current 
startup object class.

Pete
0
Peter
5/31/2010 5:07:45 AM
Reply:

Similar Artilces:

Selected application/file not on top
If I currently have 18 windows open (and yes, I work with that many open at times) of various programs, and I open another file from a shortcut or from the Desk Top's "My Documents", or from Recent Documents, it opens minimized with all the other windows at the bottom of the screen, then I have to look for it and click on it to maximize it. Why does it open in a minimized status? Is there a way to change this? Connie In news:D0C235BB-0E9E-437E-9B88-520CDE7968A1@microsoft.com, Connie Martin <ConnieMartin@discussions.microsoft.com> typed: > If I currently...

RPC over HTTPS and Windows Firewall
I have our two office laptops configured via GroupPolicy to have full Firewall blocking when disconnected from the domain, and disabled Firewall when connected to the domain. I have also set up the server for RPC over HTTPS, and configured my Exchange to use this connection first on both fast and slow connections. Exchange does indeed connect. Lastly I have configured a laptop to work this way, and attempted to connect to Exchange wirelessly, with no luck. So, my first thought is that the Firewall is blocking the connection. Is this possible? I would have thought SSL was not blocked. My...

SONY Viao with Vista X64 and Net.Framework 2.0
I have a SONY Viao Laptop running VISTA X64 with all the latest updates installed. I am trying to run a PCTV 880e tuner and when I try to run the software for the TV tuner it says I need to install Net.Framework 2.0 I try to install it and I get a message saying it is already part of the operating system. Does anyone have any idea as to what is going on and how to fix this. The PCTV 880e comes with both 32 bit and 64 bit dirvers for XP and Vista. Harold A Climer Dept. Of Physics Geology, and Astronomy U.T, Chattanooga Rm. 406A Engineering, Math & Computer Science Building 615 ...

Outlook & Windows wont remember my password #3
I have recently set myself up as a new user on someone else's PC, (Win XP Home). My profile will not remember / store my passwords in either Messenger, Outlook 2003 or other applications. I have tried replacing the Registry key as per the Microsoft KB article, but even that doesnt seem to work. The first user's profile has always been fine, and renains so. Any ideas? ...

New Windows 2003 User can not get Exchange 5.5 Public Folder
To whom ever: I have been testing an Outlook addin and we had to test some functions for a mobile user. The administrator created a new user on the Windows 2003 Domain. This user was never on our Exchange 5.5 email server and was never in the old NT domain. The user can access all folders on the Exchange 2003 Server but is unable to access the company calendar that is still on the Exchange 5.5 server. It appears to me to be some sort of authority issue but am not sure whee to start? Any suggestions? Thank you in advance DW Gard ...

Writing and Retrieving Configuration from an XML Document in C#
Hi, I'm a student and new to the .net framework. What is the best way to save configuration properties (not user specific) for a C# application? I read a few messages talking about using XML to save properties. I read about using app.config, but it seems you have to manually edit the file in order to change its values, and I don't want those values hard coded. I'm trying to avoid the registry. In my reading I have concluded that using an XML file would have more advantages over using the registry, .ini or .dat file. In my application I have a few textboxes, and every tim...

How to make the default view the Web Layout in Outlook 2002 New Message window?
Hello How to make the default view the Web Layout in Outlook 2002 New Message window? The Word is used as the e-mail editor. ...

Publsher 2003 compatable with Windows ME
Is MS Publsher 2003 compatable with Windows ME. If not what version is? Grovero wrote: > Is MS Publsher 2003 compatable with Windows ME. If not > what version is? ============================================== No, Pub 2003 requires Windows XP or Windows 2000 SP3. Publisher 2003 System Requirements http://tinyurl.com/4cq2y For Windows ME...try Pub 2002 or earlier. -- John Inzer return e-mail disabled John Inzer <oobie@doobie.xyz> was very recently heard to utter: > For Windows ME...try Pub 2002 or earlier. .... or upgrading, as Windows ME is possibly the least stabl...

[ANN] Professional Image Viewer and "RAW Codecs" for Windows
www.fastpictureviewer.com announces the immediate availability of its professional image viewer, FastPictureViewer Professional, along with the accompanying codec pack, FastPictureViewer Codec Pack, also available separately and supporting 37 image formats. The image decoders extends Window 7 Explorer 64-bit and 32-bit by enabling thumbnail views, along with full-size image viewing in Windows Photo Viewer and Media Center for "raw" formats coming from more than 300 digital camera models, along with several specialists image formats such as OpenEXR, DDS, TGA, PNM, PBM, PGM ...

Outlook 2003 options window font too large
If I go to Tools->Options. The Options window that opens does not appear correct. The text is larger than the text in all the other Office suite software's Options windows. I've tried reinstalling Outlook. (Even deleted registry settings for Outlook) I've tried different settings under Windows XP's Display Properties->Appearance->Advanced. Has anybody seen this? And more importantly, does anybody have a solution? Regards, Dawid Oosthuizen This just started happening to me as well. It is only in Outlook 2003. If I open mail in the control panel it too has th...

Windows XP theme problem for toolbar
hello i am using Windows XP theme for a program that contains a toolbar button with TBSTYLE_DROPDOWN property set. the problem is that the arrow key shown next to the toolbar button remains focused whether or not the mouse is over the button or not. Is this a known problem or am i missing something? the problem is solved when used without XP theme. I am using VC++ 6 with SDK 2003 (Novemeber) with Windows XP SP1 as OS. thank you. ...

jerky windows
What do I have to do to get information in an open window to scroll smoothly. When I try to scroll through a page it is all jerky, even when moving the scroll bar. Apreciate any information as I can't seem to find a cure. brian cunningham wrote: >What do I have to do to get information in an open window to scroll >smoothly. When I try to scroll through a page it is all jerky, even when >moving the scroll bar. >Apreciate any information as I can't seem to find a cure. if you are using windows Xp , Switch it to classic view, this may help u. -- Message posted...

SP3 Windows XP com Boot Camp no iMac
Tenho um iMac com Mac OS X versão 10.4.11, disco livre de 4.5 Gbytes. processador 2.16 Ghz Intel Core2 Duo, memória 1 Gbyte 667 Mhz DDR2. Instalei o Boot Camp BETA 1.4 para poder criar uma partição Windows e instalei o XP com o SP2, original e registado. Consigo instalar todas as actualizações disponíves através do Microsoft Update excluindo o SP3 que dá sempre a mesma mensagem de erro quer seja instalado directamente da net, do disco ou de CD. Erro de Configuração do Servive Pack 3. Não Existe Espaço em disco suficie...

windows small business server 2003R2
i am considering change MSDE to windows small business server 2003R2 to increase my data base capacity. will rms ver. 1.2 and 1.3 run on it. What are the issues . my operating system is xp. can anyone help? hi Dexter, There is no problem you can run on any OS RMS 1.2 and 1.3 I have been running this for many years. Akber "dexter" wrote: > i am considering change MSDE to windows small business server 2003R2 to > increase my data base capacity. will rms ver. 1.2 and 1.3 run on it. What are > the issues . my operating system is xp. > can anyone help? > Hi Akbe...

30 formats conditionnels, c'est possible ?
Bonsoir � toutes et tous. Pas encore test� : CFPlus v1.01.080-Beta release. Ce .XLA est annonc� comme pouvant permettre d'appliquer jusqu'� 30 formats conditionnels... http://www.xldynamic.com/source/xld.CFPlus.Download.html Si cela peut vous �tre utile... -- Bien cordialement, ===================================== P. Bastard. Pour me contacter, remplacez "Chez" par @ dans l'adresse Une foule de conseils utiles sur le site de Misange : http://www.excelabo.net You would have to use a select case macro -- Don Guillett SalesAid Software donaldb@281.com "Patr...

XmlTextWriter to XmlDocument in .net framework 2.0
Is there a way I can write to an XmlDocument using an XmlWriter style interface efficiently in the framework 2.0? In 1.1, you could write to a MemoryStream then load that into an XmlDocument, but this was pretty inefficient. The XmlNodeWriter sample helped here and I was expecting that to appear in the 2.0 framework but it doesn't appear to be there. Am I missing something? James Berry wrote: > Is there a way I can write to an XmlDocument using an XmlWriter style > interface efficiently in the framework 2.0? > > In 1.1, you could write to a MemoryStream then load that int...

New Window adjustment for full screen...
Well I hope this isn't a stupid question. For some reason I feel silly. When I would click on link from e-mail generally--which normally opens full screen window, it won't do it now. I must have hit something by accident to screw it up. What do I do to (in tools???) to get link to open to full screen/new window???? Its minimized now for some reason....opposed to maxinized. Well, at least I got it off my chest. Thank you. -- vistadude ------------------------------------------------------------------------ vistadude's Profile: http://forums.techarena.in/member...

Installation on Windows 7
I'm getting .net 2.0 errors installing GP and PDK on Windows 7. I know it's beta and all, but is it feasible? .Net 2.0 I thought was part of the OS just like Vista. Anyone know anything about this? Thanks in advance! i don't believe that Windows 7 is part of the equation. The issue is that 10.0 RTM/SP1 are not ".net 2.0 SP1" aware. Load the 10.0 SP2 client directly (probably have to download the cd image) and install it or search knowledgebase to get the transform files and command line syntax to install the older version. patrick dev support -- This postin...

Exchange 2003 server and Windows 2000 PDC...
Hi, We are planning to upgrade our Exchange 2000 server to Exchange 2003 Enterprise, mostly to overcome the 16GB mailbox size limit. It is supposed to live in a Windows 2000 server environment (Active Directory). Is it reccomended to mix Windows 2003 Exchange server with Windows 2000 domain controllers? Can they coexist smoothly, or should I upgrade all domain controllers to 2003 server? Thanks in advance Faustino It will work just fine. There is no problem to mix Exchange 2003 with W2K DC's. I was looking for the support matrix, but can't seem to find it ata the moment. -- ...

Best way to upgrade to Windows 7
Hi, Is there a way to upgrade to Windows 7 w/o losing programs and data? Thanks, Oreally "OREALLY" <oreally@comcast.net> wrote in message news:O4YfTOYxKHA.3560@TK2MSFTNGP02.phx.gbl... > Hi, > > Is there a way to upgrade to Windows 7 w/o losing programs and data? > If you are using XP you can 'upgrade' to Vista. From Vista you can upgrade to W7. There may be other methods but MS has not made it so XP users can instantly go from XP to W7... and I'm not sure why! No unless you go by intermediate stage via vista as "Someone Wat...

how to make forms like the start page of visual studio.net
hi, how is it possible to make forms like start page of visual studio.net. It seems it is like a web page, but the application itself handles the links that are pressed, not the brouser activex itself. thanks, Behzad "behzad" <behzadnn@yahoo.com> wrote in message news:%23H3S9vCZDHA.652@TK2MSFTNGP10.phx.gbl... > hi, > how is it possible to make forms like start page of visual studio.net. > It seems it is like a web page, but the application itself handles the links > that are pressed, not the brouser activex itself. I don't know how the IDE does it, but ...

Creating a MediaPlayer application
Hi, I want to create a Windows Media player kind of application that displays a 5 second clip. The clips are in RGB format. What is the easiest way to do that in VC++. I am new to this language and would really appreciate any kind of help - suggestions, tips, pointers, links to tutorials/samples et al. Hope to hear from someone out there "Rookie" <dominicjoseph@rediffmail.com> wrote in message news:<#lJf6unbEHA.1248@TK2MSFTNGP11.phx.gbl>... > Hi, > > I want to create a Windows Media player kind of application that displays a > 5 second clip. The clips ar...

This is about some windows xp updates. Unsure if I should post her
I checked the Windows Update newsgroup, and it's blank. So i'll ask this question here, and if I should post it somewhere else, please let me know. I downloaded Microsoft .NET Framework 4 Client Profile for Windows XP x86 (KB982670), and Windows PowerShell 2.0 and WinRM 2.0 for Windows XP and Windows Embedded (KB968930) from the windows update site. For some reason my cmputer froze mid-way. Now the update site believes I downloaded and installed both. What I think happened is Framework 4.0 installed, because I uninstalled it in Add and Remove programs. i can't find ...

Dos printing under Windows
I have created a text file and that text file is directly copied to LPT1 as copy/B filename.txt LPT1 and it prints correctly. Now i gives second file to LPT1 after first file is printed,it gets printed on the next page. I don't want this automatic formfeed in between. The second file should be printed just below the first file contents. OR How to set custom paper size when printing directly to LPT1 through file? You could create one file containing all the files you want to print, using copy file1.txt + file2.txt dest.txt or copy *.txt dest.txt and then print dest.txt as before Inc...

Can't open email windows mail
I have gone through my internet provider and they tell me that my mail problem is with microsoft not them. What do i need to do to fix the problem and start getting my mail? This is the disclaimer that comes up when I try to open my mail. The host 'pop3.suddenlink.net' could not be found. Please verify that you have entered the server name correctly. Account: 'pop3.suddenlink.net', Server: 'pop3.suddenlink.net', Protocol: POP3, Port: 110, Secure(SSL): No, Socket Error: 11001, Error Number: 0x800CCC0D Also, here is the second message I receive. &...