hi frnds
what is ops parameter in c#.net n why we use?
pl share with example which can explain in intervws?
hi frnds
what is ops parameter in c#.net n why we use?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sandeep NeelaPosted Feb 15, 2016, 3:56 PM
Chandu KumawatPosted Feb 15, 2016, 3:59 AM
Chandu KumawatPosted Feb 15, 2016, 3:58 AM
Here, we set the formal parameter 'value' to 1, and the formal parameter 'name' to "Perl". Whenever Method is called without a parameter specified, its default value is used instead in the method body.{{// Omit the optional parameters.// Omit second optional parameter.// You can't omit the first but keep the second.// Method("Dot"); // Classic calling syntax.Method(4, "Dot"); // Specify one named parameter.Method(name: "Sam"); // Specify both named parameters.{ Console.WriteLine("value = {0}, name = {1}", value, name);Amit Kumar SinghPosted Feb 15, 2016, 3:55 AM