Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

wat

Name: Anonymous 2011-08-14 23:38

So in C++ I could do

class A {
    int B();
}

int A::B()
{
    return 1;
}


i.e. I could keep my class definition and the code for the methods separate, but I can't figure out how to do the same thing in C#.  Do I really have to use "partial class A {}" in front of everything?

Name: Anonymous 2011-08-15 0:32

>>5
Different languages do things differently.

C++/CLI and C# are very similar otherwise, and I can do it there.

I suggest you follow the old adage: ``When in Rome, do as the Romans do.''

I'm totally with you as a general rule, I just really, really want to be able to do this one thing this way. >:I  And you'll never convince me the C# way is easier to work with or maintain.  Having the entire class consist solely of one longass lump of code without a separate definition is like having a book with no table of contents.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List