Small doubt in c# pls clarify me if any one

If we have passed three parameters into one method but i will call and pass Only two i wont call 3rd is it possible

Your Answer

You can use optional paramter
public void test(int p1,int p2,int p3=0)
{
}
call like this 
test(1,2)
if you want to pass value for 3rd paramter then 
test(1,2,3)
 

C Sharp Dot Net

Didn't get the answer.
Contact people of Talent-C Sharp Dot Net directly by clicking here