.NET_Framework

.NET Core.NET Framework Acronym Glossary.NET Framework ADO.NET.NET Framework CLR.NET Framework Code Contracts.NET Framework Collections.NET Framework Custom Types.NET Framework DateTime parsing.NET Framework Dependency Injection.NET Framework Dictionaries.NET Framework Encryption / Cryptography.NET Framework Exceptions.NET Framework Expression Trees.NET Framework File Input/Output.NET Framework ForEach.NET Framework Garbage Collection.NET Framework Globalization in ASP.NET MVC using Smart internationalization for ASP.NET.NET Framework HTTP clients.NET Framework HTTP servers.NET Framework Introduction.NET Framework JIT compiler.NET Framework JSON Serialization.NET Framework LINQ.NET Framework Managed Extensibility.NET Framework Memory management.NET Framework Networking.NET Framework NuGet packaging system.NET Framework Platform Invoke.NET Framework Process and Thread affinity setting.NET Framework Reading and writing Zip files.NET Framework ReadOnlyCollections.NET Framework Reflection.NET Framework Regular Expressions (System.Text.RegularExpressions).NET Framework Serial Ports.NET Framework Settings.NET Framework SpeechRecognitionEngine class to recognize speech.NET Framework Stack and Heap.NET Framework Strings.NET Framework Synchronization Contexts.NET Framework System.Diagnostics.NET Framework System.IO.NET Framework System.IO.File class.NET Framework System.Net.Mail.NET Framework System.Reflection.Emit namespace.NET Framework System.Runtime.Caching.MemoryCache (ObjectCache).NET Framework Task Parallel Library (TPL).NET Framework Task Parallel Library (TPL) API Overviews.NET Framework Threading.NET Framework TPL Dataflow.NET Framework Unit testing.NET Framework Upload file and POST data to webserver.NET Framework Using ProgressT and IProgressT.NET Framework VB Forms.NET Framework Work with SHA1 in C Sharp.NET Framework Write to and read from StdErr stream.NET Framework XmlSerializerJSON in .NET with Newtonsoft.JsonParallel processing using .NET framework



.NET Framework Introduction

From WikiOD

Remarks[edit | edit source]

The .NET Framework is a set of libraries and a runtime, originally designed by Microsoft. All .NET programs compile to a bytecode called Microsoft Intermediate Language (MSIL). The MSIL is run by the Common Language Runtime (CLR).

Below you can find several examples of "Hello World" in various languages that support the .NET Framework. "Hello World" is a program that displays "Hello World" on the display device. It's used for illustrating the basic syntax for constructing a working program. It can also be used as a sanity test to make sure that a language's compiler, development environment, and runtime environment are all working correctly.

List of languages supported by .NET

Versions[edit | edit source]

.NET[edit | edit source]

Version Release Date
1.0 2002-02-13
1.1 2003-04-24
2.0 2005-11-07
3.0 2006-11-06
3.5 2007-11-19
3.5 SP1 2008-08-11
4.0 2010-04-12
4.5 2012-08-15
4.5.1 2013-10-17
4.5.2 2014-05-05
4.6 2015-07-20
4.6.1 2015-11-17
4.6.2 2016-08-02
4.7 2017-04-05

Compact Framework[edit | edit source]

Version Release Date
1.0 2000-01-01
2.0 2005-10-01
3.5 2007-11-19
3.7 2009-01-01
3.9 2013-06-01

Micro Framework[edit | edit source]

Version Release Date
4.2 2011-10-04
4.3 2012-12-04
4.4 2015-10-20

Hello World in C#[edit | edit source]

using System;

class Program
{
    // The Main() function is the first function to be executed in a program
    static void Main()
    {
        // Write the string "Hello World to the standard out
        Console.WriteLine("Hello World");
    }
}

Console.WriteLine has several overloads. In this case, the string "Hello World" is the parameter, and it will output the "Hello World" to the standard out stream during execution. Other overloads may call the .ToString of the argument before writing to the stream. See the .NET Framework Documentation for more information.

Live Demo in Action at .NET Fiddle

Introduction to C#

Hello World in F#[edit | edit source]

open System

[<EntryPoint>]
let main argv = 
    printfn "Hello World" 
    0

Live Demo in Action at .NET Fiddle

Introduction to F#

Hello World in Visual Basic .NET[edit | edit source]

Imports System

Module Program
    Public Sub Main()
        Console.WriteLine("Hello World")
    End Sub
End Module

Live Demo in Action at .NET Fiddle

Introduction to Visual Basic .NET

Hello World in C++/CLI[edit | edit source]

using namespace System;

int main(array<String^>^ args)
{
    Console::WriteLine("Hello World");
}

Hello World in IL[edit | edit source]

.class public auto ansi beforefieldinit Program
       extends [mscorlib]System.Object
{
  .method public hidebysig static void  Main() cil managed
  { 
    .maxstack  8
    IL_0000:  nop
    IL_0001:  ldstr      "Hello World"
    IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
    IL_000b:  nop
    IL_000c:  ret
  }

  .method public hidebysig specialname rtspecialname 
          instance void  .ctor() cil managed
  {
    .maxstack  8
    IL_0000:  ldarg.0
    IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
    IL_0006:  ret
  }

}

Hello World in PowerShell[edit | edit source]

Write*Host "Hello World"

Introduction to PowerShell

Hello World in Nemerle[edit | edit source]

System.Console.WriteLine("Hello World");

Hello World in Oxygene[edit | edit source]

namespace HelloWorld;

interface

type
  App = class
  public
    class method Main(args: array of String);
  end;

implementation

class method App.Main(args: array of String);
begin
  Console.WriteLine('Hello World');
end;

end.

Hello World in Boo[edit | edit source]

print "Hello World"

Hello World in Python (IronPython)[edit | edit source]

print "Hello World"
import clr
from System import Console
Console.WriteLine("Hello World")

Credit:Stack_Overflow_Documentation