c sharp programming language code example

Example 1: c#

if your looking for C# or C++ compiler IDE I would suggest visual studio 2019.

Example 2: c#

Console.WriteLine("Hello World!");

Example 3: c#

using System; 

namespace ExampleApp {
    class Example {
        static void Main(string[] args) {
            Console.WriteLine("Hello, world!");
        } 
    } 
}

Example 4: C#

using System;
using System.Drawing;

public class Example
{
    public static Image img;

    public static void Main()
    {
        img = Image.FromFile("Image.png");
    }
}

Example 5: c#

double num = //some number you have
double num2 = //some another number you have
Console.WriteLine(num + num2);