473,397 Members | 2,084 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,397 software developers and data experts.

hello world example

Hello!

Here I have a very easy hello world example.
This example works fine. I just wonder how can it work when I have
private on the Main method. I would think that the operating system would
not be able to
call this Main method when I have decared it as private. Normally this
private is only for class members as you know. The reason it work must be
because the operating system (CLR) is considered as a class member.
using System;

class Hello
{
private static void Main()
{
Console.WriteLine("Hello world");
}
}

//Tony



Jul 24 '06 #1
2 1483
"Tony Johansson" <jo*****************@telia.coma écrit dans le message de
news: oE******************@newsb.telia.net...

Are you serious, or is this just an excuse to get people to see your
advertising ?

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer
Jul 24 '06 #2
Of course, a *gif* of a hyperlink (without the url visible) possibly has to
count as the worst advertising ever...

And Tony: giving you the benefit of the doubt, this is nothing to do with
the OS - it's just that the assembly defines it's own start point, and the
runtime finds this acceptable regardless of visibility. Note that your class
"Hello" is actually "internal", not "public", so you have the runtime
invoking a private member on an internal class. It just isn't an issue. Your
assembly says Hello.Main is the entry-point, and thus it is.

Marc

"Joanna Carter [TeamB]" <jo****@not.for.spamwrote in message
news:eC****************@TK2MSFTNGP03.phx.gbl...
"Tony Johansson" <jo*****************@telia.coma écrit dans le message
de
news: oE******************@newsb.telia.net...

Are you serious, or is this just an excuse to get people to see your
advertising ?

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer


Jul 24 '06 #3

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

Similar topics

6
by: Robert Maas, see http://tinyurl.com/uh3t | last post by:
System login message says PHP is available, so I tried this: http://www.rawbw.com/~rem/HelloPlus/h.php It doesn't work at all. Browser just shows the source. What am I doing wrong?
2
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
17
by: Tim Judd | last post by:
I must not be grasping anything here. Just a simple application, as follows (as any first-program is...) ---- #include <iostream.h> int main() { cout <<"hello world"; return 0;
8
by: vijay | last post by:
Hello, As the subject suggests, I need to print the string in the reverse order. I made the following program: # include<stdio.h> struct llnode { char *info;
3
by: salvadorvp | last post by:
Hi, here I have a very simple 'hello world' example that makes use of Yahoo! User Interface Library. I have a problem with my response string coming back as ''. I managed to check that everything...
0
by: C.W.Holeman II | last post by:
As K&R state the hardest part is getting a first instance to work. So I am looking for a "hello, world!" example for adding an additional element to an XHTML file. <html> <head><title>Hello,...
1
by: James T. Dennis | last post by:
You'd think that using things like gettext would be easy. Superficially it seems well documented in the Library Reference(*). However, it can be surprisingly difficult to get the external details...
0
by: Gerardo Herzig | last post by:
Hi all. Im having some "problems" with a small concurrent plpython function. Based on a small example about concurrent programming, there is some code which works fine under python: #!...
11
by: cj | last post by:
Perhaps someone knows how to do this. When I open a new ASP.NET web service application in VS 2008, it opens with a simple Hello World web service already written. I want to see this work. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.