class NumberManipulator { public void getValue(out int x ) { int temp = 5; x = temp; } static void Main(string[] args) { NumberManipulator n = new NumberManipulator(); /* local variable definition */ int a = 100; Console.WriteLine("Before method call, value of a : {0}", a); /* calling a function to get the value */ n.getValue(out a); Console.WriteLine("After method call, value of a : {0}", a); Console.ReadLine(); } }Before method call, value of a : 100 After method call, value of a : 5
Tuesday, January 2, 2018
C# - Passing Parameters by Output
Subscribe to:
Post Comments (Atom)
javascript Filter/index off
var family = [{"name":"Jack", "age": 26}, {"name":"Jill", "age"...
-
A3+C3 VLOOKUP(G3,$A$3:$B$10,2) sum Product Quantity Count Result 1 Mobile 2 1 Mobile 3 Keyboard 3 2 Mobile 6 TV 1 3 ...
-
EF CORE CLI > dotnet ef database update MyFirstMigration. Scaffold-DbContext Command Use Scaffold-DbContext to create a model based ...
No comments:
Post a Comment