Amutha
Amutha

Reputation: 67

Why Partial delegates are not allowed in C#?

Recent interview question is

If C# language allow us create partial delegates what are the consequences will you meet?

Help me to understand the reason.

Thanks in advance.

Upvotes: 4

Views: 618

Answers (2)

Chris Taylor
Chris Taylor

Reputation: 53729

You should ask for clarification on this question. Because C# does support creating a delegate to a partial method as long as the partial method has been implemented. If this is what the question is implying then I guess 'the consequence you will meet' is that the partial method must be implemented and not only defined.

The wording 'create partial delegate' does not make any sense since we have no definition of what a partial delegate might be.

Upvotes: 9

Ohad Schneider
Ohad Schneider

Reputation: 38172

Doesn't really make any sense to me.. when you define a delegate you need its signature, there's no point in a "partial" signature, it really says nothing

Upvotes: 2

Related Questions