Preview:
using System;
using System.Runtime.InteropServices;
  
class GFG {
  
    // Method containing optional parameter
    // Using OptionalAttribute
    static public void my_mul(int num,
                [ Optional ] int num2)
    {
        Console.WriteLine(num * num2);
    }
  
    // Main Method
    static public void Main()
    {
        my_mul(4);
        my_mul(2, 10);
    }
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter