2017-04-08

Example of Using Function in C#

class Program

{
    static void Main()

    {
        //define a new function
        Func<int, string> newFunction = definedFunction;
        Console.WriteLine(newFunction(1234));  //console will print string "1234"
    }
    //define functions with string return
    static String definedFunction (int index)
    {
        return index.ToString();
    }
}

No comments:

Post a Comment

Setup VNC on Ubuntu 20.04

  sudo apt update sudo apt install xfce4 xfce4-goodies sudo apt install tigervnc-standalone-server sudo apt install tightvncserver vncserver...