beeeefy
beeeefy

Reputation: 527

What's the difference between an C# Interface and an Objective-C Protocol?

What's the difference between a C# Interface and an Objective-C Protocol? I ask because I'm diving into ASP.NET MVC and I'm trying to grasp some of the new concepts and it will help if I can relate them to my Objective-C iOS programming background.

Thanks for your help!

Upvotes: 2

Views: 1462

Answers (1)

mipadi
mipadi

Reputation: 410722

They're basically the same. In Objective-C 2.0, though, you can mark some methods in a protocol as "optional" (using the @optional qualifier), which means that classes that implement the protocol aren't required to implement those methods.

Upvotes: 7

Related Questions