text
stringlengths
0
13.4k
Introduction to Visual Basic .NET
Section 1.4: Hello World in C++/CLI
using namespace System;
int main(array<String^>^ args)
{
Console::WriteLine("Hello World");
}
Section 1.5: Hello World in IL
.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
}
GoalKicker.com – .NET Framework Notes for Professionals
3
.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
}
}
Section 1.6: Hello World in PowerShell
Write-Host "Hello World"
Introduction to PowerShell
Section 1.7: Hello World in Nemerle
System.Console.WriteLine("Hello World");
Section 1.8: Hello World in Python (IronPython)
print "Hello World"
import clr
from System import Console
Console.WriteLine("Hello World")
Section 1.9: Hello World in Oxygene
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.
Section 1.10: Hello World in Boo
print "Hello World"
GoalKicker.com – .NET Framework Notes for Professionals
4
Chapter 2: Strings
Section 2.1: Count characters
If you need to count characters then, for the reasons explained in Remarks section, you can't simply use Length
property because it's the length of the array of System.Char which are not characters but code-units (not Unicode
code-points nor graphemes). Correct code is then:
int length = text.EnumerateCharacters().Count();