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

Can we store PROGID information in database and dynamically load the component ?

1 Answers   Digital GlobalSoft, e4e,


How would you get asp.net running in apache web servers?

0 Answers  


How will you load dynamic assembly?

0 Answers  


How do you do client-side validation in .net? How to disable validator control by client side javascript?

0 Answers  


Difference between ADO.net Dataset , ADO Record Set & ADO Data Reader?

3 Answers   HCL, NIIT,


You need to be able to retrieve data from DataSet object that has four DataTable objects. There are currently UniqueConstraint and ForeignKeyConstraint Object on the DataTable objects to enforce the data rules. You find that you can retrieve the data from the individual DataTable objects, but you are not able to retrieve the data from the combination of DataTable objects in a Parent/Child manner. What should you do to able to retrieve the data in a Parent/Child manner? a) Set the EnforceParentChild parameter of the DataSet to True. b) Set the EnforceRelation parameter of the Relations collection to True. c) Add DataRelation objects to the Relations Collection to make the DataSet present the data in Parent/Child manner. d) Add a primary key and a foreign key to each of the DataTable objects that should present the data in a Parent/Child manner.

1 Answers   Syntax Softtech,


Where do you store the information about the user?s locale?

1 Answers   Siebel, Visual Soft,


Is there any alternative to avoid name collisions other then Namespaces?

0 Answers  


What websites use asp.net?

0 Answers  


How do you hide the columns?

0 Answers  


can sn.exe can be used before gacutil.exe

2 Answers   Accenture,


In how many ways we can retrieve table records count?

0 Answers  


Categories