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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Will the asp.net validators run in server side or client side? How do you do client-side validation in .net?

697


What do you mean by query string?

722


How do you declare static variable? What is its lifetime?

723


How many types of triggers are there in update panel?

775


To display data in the combo box, prior to setting the Data Source, what kind of property on a Combo Box do you set with a column name?

813


What are server side controls?

746


Define a web service in .net?

819


Can the validation occurs in server-side or client-side? If the validation occurs why should we do?

817


What is the full form of asp.net?

727


What is the server of asp.net?

741


What is the procedure to create the environment for asp.net? : asp.net mvc

718


Which method do you use to enforce garbage collection in .net?

714


i want to implement grid view value in paypal site. so how to create this code in asp.net with C#

1729


What are the steps to follow to host a web application on a web server?

777


How do you declare static variable?

770