there is two functions function a and function b like
fun a(){....
.....
}

fun b()
{

}
in function b i write the coding to add two numbers and i
need to dispaly the sum result in function a with out using
global variable. how we do?



there is two functions function a and function b like fun a(){.... ..... } fun b() { } i..

Answer / imatoria

1. Either change the signature of function a() to function
a(int total).
2. Or Make the function a() as the extension function:
static function a(this int total).

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

How Web Services help Us? What r the difference between Remoting and webservices

5 Answers   Protech, TCS, Tech Mahindra,


What is the difference between Session and response.Redirect?

0 Answers   Microsoft,


What is globalization and localization in asp net?

0 Answers  


What is a Windows Service and how does its lifecycle differ from a "standard" EXE?

2 Answers  


What is the state management in asp.net?

0 Answers  






Explain diff. Between friend and protected friend?

0 Answers  


Types of object in asp ?

1 Answers   Accenture,


Explain the difference between asp.net mvc and asp.net webforms? : asp.net mvc

0 Answers  


What is boxing and unboxing ?

7 Answers   Accenture, Infosys, MedTek,


Is a dll file an executable?

0 Answers  


What do you mean by View State and what is its role?

0 Answers   Wipro,


How does Garbage collector(GC) works in .net

14 Answers   Accenture, HCL, Kekran Mekran, People Tech, Wipro,


Categories