Answers for "Call Method"

C#
0

Call Method

using System;

public class Example
{
   public static void Main()
   {
      int value = 20;
      Console.WriteLine("In Main, value = {0}", value);
      ModifyValue(value);
      Console.WriteLine("Back in Main, value = {0}", value);
   }

   static void ModifyValue(int i)
   {
      i = 30;
      Console.WriteLine("In ModifyValue, parameter value = {0}", i);
      return;
   }
}
// The example displays the following output:
//      In Main, value = 20
//      In ModifyValue, parameter value = 30
//      Back in Main, value = 20
Posted by: Guest on June-18-2021
-2

js call and apply

func.call([thisArg[, arg1, arg2, ...argN]])
Posted by: Guest on July-31-2020

C# Answers by Framework

Browse Popular Code Answers by Language