• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# First chapter done.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

2 replies to this topic

### #1Durfy  Members

Posted 08 August 2007 - 05:31 AM

Yeah I signed up but I've been so busy until recently. I finally got through the first chapter. I have to say that C# looks like a pretty impressive language. I have a few questions though ( I come from C++(intermediate) ) I dont quite understand interfaces. Say I have
interface i {
void SetColor(Color color);
}


and I implement it in a class like so class Ball : i does that mean that Ball must contain the method SetColor with the same signature? also if interface has a member(variable) would that mean that Ball will inherit that? The other subject I was completely lost on is delegates. Should I just read more and eventually I'll learn, or should I understand the basic concept at this point. (it mentioned C++ function pointers but i'm lost there too) Thanks for your time, -durfy

### #2Telastyn  Members

Posted 08 August 2007 - 05:39 AM

Quote:
 Original post by Durfydoes that mean that Ball must contain the method SetColor with the same signature?

Yes, or compiler error.

Quote:
 also if interface has a member(variable) would that mean that Ball will inherit that?

Interfaces may not contain member variables.

Quote:
 The other subject I was completely lost on is delegates. Should I just read more and eventually I'll learn, or should I understand the basic concept at this point. (it mentioned C++ function pointers but i'm lost there too)

If you're not familiar with C++ function pointers then you should read more. If you are, then in C# the delegate keyword acts as a C++ typedef for a function pointer. That may then be used to declare and use delegate objects which are more like C++ function pointers, only less icky.

### #3Durfy  Members

Posted 08 August 2007 - 05:42 AM

Thanks a lot dude.
I will keep reading.
Hopefully I will power through a couple chapters and catch up.
Thanks,
-durfy

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.