Optional Parameters in C sharp Arabic #66


 

Optional Parameters in C sharp Arabic #66

Overloading Indexers in C sharp Arabic #65

❑ Different ways that are available to make method parameters optional



Optional Parameters

1. Use Parameter arrays
2. Method overloading
3. Specify parameter defaults
4. Use OptionalAttribute that is present in System.Runtime.InteropServices namespace.

Please note that , a parameter array must be the parameter in a formal parameter list .the following function will not compile.

Follow Us

YouTube

 If you want to download pptx : click Telegram

Facebook

Twitter

Instagram

Tik Tok

إرسال تعليق

أحدث أقدم