Click here to Skip to main content
15,914,767 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus21-Jul-02 15:40
protectorChristian Graus21-Jul-02 15:40 
GeneralRe: C# - language design by committee ??? Pin
jparsons22-Jul-02 5:25
jparsons22-Jul-02 5:25 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus22-Jul-02 12:17
protectorChristian Graus22-Jul-02 12:17 
GeneralRe: C# - language design by committee ??? Pin
Rama Krishna Vavilala22-Jul-02 5:37
Rama Krishna Vavilala22-Jul-02 5:37 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus22-Jul-02 12:18
protectorChristian Graus22-Jul-02 12:18 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus22-Jul-02 2:14
protectorChristian Graus22-Jul-02 2:14 
AnswerRe: C# - language design by committee ??? Pin
Nish Nishant21-Jul-02 15:49
sitebuilderNish Nishant21-Jul-02 15:49 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus21-Jul-02 15:57
protectorChristian Graus21-Jul-02 15:57 
Nishant S wrote:
I thought you could in C#

Nope.

class Myclass
{
static public string Myfunction()
{
return "C# can be pretty dumb at times";
}
}

Myclass s;
System.MessageBox.Show(s.Myfunction()); // No way, no how.

This will NOT work. Nor can I do this:

class Myclass
{
static public string Myfunction()
{
return "C# can be pretty dumb at times";
}
public string Myfunction()
{
return "C# can be pretty dumb at times";
}
}

as it will (correctly IMO) not compile. So if I want to provide some methods as static because they do not need any internal state access, and could be more useful if they could be accessed that way, my users cannot access them from an instance of my class.

That SUCKS.

Christian

Christian

come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
GeneralRe: C# - language design by committee ??? Pin
Andy Smith21-Jul-02 17:07
Andy Smith21-Jul-02 17:07 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus21-Jul-02 17:14
protectorChristian Graus21-Jul-02 17:14 
GeneralRe: C# - language design by committee ??? Pin
Nish Nishant21-Jul-02 17:12
sitebuilderNish Nishant21-Jul-02 17:12 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus21-Jul-02 17:19
protectorChristian Graus21-Jul-02 17:19 
GeneralRe: C# - language design by committee ??? Pin
James T. Johnson21-Jul-02 18:01
James T. Johnson21-Jul-02 18:01 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus21-Jul-02 18:18
protectorChristian Graus21-Jul-02 18:18 
GeneralRe: C# - language design by committee ??? Pin
James T. Johnson21-Jul-02 18:54
James T. Johnson21-Jul-02 18:54 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus21-Jul-02 19:04
protectorChristian Graus21-Jul-02 19:04 
GeneralRe: C# - language design by committee ??? Pin
James T. Johnson21-Jul-02 20:14
James T. Johnson21-Jul-02 20:14 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus21-Jul-02 20:33
protectorChristian Graus21-Jul-02 20:33 
GeneralRe: C# - language design by committee ??? Pin
James T. Johnson21-Jul-02 21:12
James T. Johnson21-Jul-02 21:12 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus22-Jul-02 12:08
protectorChristian Graus22-Jul-02 12:08 
GeneralRe: C# - language design by committee ??? Pin
Gerald Schwab22-Jul-02 17:28
Gerald Schwab22-Jul-02 17:28 
GeneralRe: C# - language design by committee ??? Pin
Kevin McFarlane22-Jul-02 9:49
Kevin McFarlane22-Jul-02 9:49 
GeneralRe: C# - language design by committee ??? Pin
Eric Gunnerson (msft)22-Jul-02 6:40
Eric Gunnerson (msft)22-Jul-02 6:40 
GeneralRe: C# - language design by committee ??? Pin
Christian Graus22-Jul-02 12:09
protectorChristian Graus22-Jul-02 12:09 
GeneralRe: C# - language design by committee ??? Pin
Andy Smith21-Jul-02 18:06
Andy Smith21-Jul-02 18:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.