Click here to Skip to main content
15,891,473 members
Home / Discussions / C#
   

C#

 
AnswerRe: Why so many class in framework sealed? Pin
Gerald Schwab9-Apr-02 17:54
Gerald Schwab9-Apr-02 17:54 
GeneralRe: Why so many class in framework sealed? Pin
9-Apr-02 20:01
suss9-Apr-02 20:01 
AnswerRe: Why so many class in framework sealed? Pin
James T. Johnson9-Apr-02 19:10
James T. Johnson9-Apr-02 19:10 
AnswerRe: Why so many class in framework sealed? Pin
Andy Smith9-Apr-02 20:10
Andy Smith9-Apr-02 20:10 
GeneralRe: Why so many class in framework sealed? Pin
Nick Parker10-Apr-02 6:42
protectorNick Parker10-Apr-02 6:42 
GeneralBitmap Button Pin
9-Apr-02 9:31
suss9-Apr-02 9:31 
GeneralRe: Bitmap Button Pin
James T. Johnson9-Apr-02 13:50
James T. Johnson9-Apr-02 13:50 
Generalswitch enhancement in C# Pin
ovarlamov9-Apr-02 8:27
ovarlamov9-Apr-02 8:27 
What could be done in C# which would add much in language expressiveness
without any penalties to security and efficiency.
Before implement any language feature I think designers discussed them many
times and surely they analyzed any similar implementation in all the languages
(not only C,C++, but Java, FoxPro, Pascal, ADA, etc). So C# is not just a
revamped dialect version of C++ + garbage collection (such attempts to create
garbage collection feature to C++ have been made many times), that's why my
question is purely ritoric: why they didn't do that? What is that ... read
below.
In language description we read that in order to go out of innermost
cycle we should use goto operator. Yes, of course, but wouldn't it be better to
write something like this?
for (condition_1)
{
....
while(condition_2)
{
....
break level; // level see next comment
/* level - int expression, if 0 means regular break;
1 - means one level up, in this particular case
means exit from for cycle
*/
...
continue level; // see comments above
}
...
}
I've been wondering why it hadn't been done since the first C-compilers
appeared, I worked then on PDP11. Java made it better, but still it is too
similar to goto..
Another question: Look at this snippet of code
if(codition_1)
{
....//do smth
}
else
{
if(codition_2)
{
....//do smth
}
else
{
if(codition_3)
{
....//do smth
}
else
{

}
}
}
isn't it ugly? Imagine 20 conditions analyzed, what will happen to nesting
level? Then compare to this: (borrowed from FoxPro,Clipper...)
switch
{
case (condition_1)
.... // no need of break, that has become obligatory in C# !!!
case (condition_1)
...
default:
}
By the way switch operator in old C-style definition could be used as well,
they wouldn't interfere with each other.
I don't see any reasons not to implement such useful features.
Alex .
ovarlamov@sprint.ca

GeneralRe: switch enhancement in C# Pin
Andy Smith9-Apr-02 8:53
Andy Smith9-Apr-02 8:53 
GeneralReflection & Assemblies Pin
Tariq9-Apr-02 5:07
Tariq9-Apr-02 5:07 
GeneralRe: Reflection & Assemblies Pin
James T. Johnson9-Apr-02 6:30
James T. Johnson9-Apr-02 6:30 
GeneralOnly one application instance Pin
Jose Fco Bonnin9-Apr-02 1:52
Jose Fco Bonnin9-Apr-02 1:52 
GeneralRe: Only one application instance Pin
David Wengier9-Apr-02 12:59
David Wengier9-Apr-02 12:59 
GeneralRe: Only one application instance Pin
Marc Clifton1-Oct-02 11:32
mvaMarc Clifton1-Oct-02 11:32 
GeneralCheckbox in Datagrid Pin
Anderson F.9-Apr-02 1:29
Anderson F.9-Apr-02 1:29 
GeneralRe: Checkbox in Datagrid Pin
ClayB9-Apr-02 23:53
ClayB9-Apr-02 23:53 
GeneralRe: Checkbox in Datagrid Pin
Anderson F.10-Apr-02 9:26
Anderson F.10-Apr-02 9:26 
GeneralWe have ASP/ASP.NET Beat Pin
Nick Parker8-Apr-02 17:43
protectorNick Parker8-Apr-02 17:43 
QuestionAm I Missing Something Here? Pin
Nick Parker8-Apr-02 17:08
protectorNick Parker8-Apr-02 17:08 
AnswerRe: Am I Missing Something Here? Pin
Christian Graus8-Apr-02 17:18
protectorChristian Graus8-Apr-02 17:18 
GeneralRe: Am I Missing Something Here? Pin
Nick Parker8-Apr-02 17:24
protectorNick Parker8-Apr-02 17:24 
GeneralRe: Am I Missing Something Here? Pin
David Wengier8-Apr-02 17:30
David Wengier8-Apr-02 17:30 
GeneralRe: Am I Missing Something Here? Pin
Christian Graus8-Apr-02 17:31
protectorChristian Graus8-Apr-02 17:31 
GeneralRe: Am I Missing Something Here? Pin
Nick Parker8-Apr-02 17:38
protectorNick Parker8-Apr-02 17:38 
GeneralRe: Am I Missing Something Here? Pin
Neil Van Note8-Apr-02 17:37
Neil Van Note8-Apr-02 17:37 

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.