c sharp documentation code example

Example 1: c#

/* Answer to: "c#" */

/*
  C# is a general-purpose, multi-paradigm programming language
  encompassing strong typing, lexically scoped, imperative,
  declarative, functional, generic, object-oriented, and
  component-oriented programming disciplines.
*/

Example 2: c# ?

/*
	A nullable value type T? represents all values of its underlying
    value type T and an additional null value. For example, you can 
    assign any of the following three values to a bool? variable: 
    true, false, or null.
*/

double? pi = 3.14;
char? letter = 'a';

int m2 = 10;
int? m = m2;

bool? flag = null;

Example 3: c#

using System; 

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

Tags:

Misc Example