ASP, .net and C Sharp: What I have learnt

* ASP is a Microsoft internet server technology which allows the developers to write server side script inline with HTML code.
code between is executed at the server. This will also do: <script language="VBScript" runat="server">
* CLR (Common Language Runtime) is the same as Virtual Machine for Java
* ASP.NET relies on .net framework and CLR which enables uses to write code in C# and other .net languages. ASP.NET is pre compiled(ASP is not) and is faster than ASP.
* ASP.NET discourages inline code blocks although it is supported.
* C# has similar concepts that Java has although there are many differences.
* C# has automatic garbage collection (which means that the objects need not be destructed in
code)
* There are no global variables in C#, every variable should belong to a class
* Duplicate variable names are not allowed in C#(unlike C and C++ where same names are alowed in different blocks)
* C# has a concept of namespaces and assemblies. assemblies are similar to Java packages.
* C# restricts only bool to be used in if conditions (no int is allowed in if stmt)
* C# allows pointers and devs can mark the pointer code as unsafe
* C# doesnt allow multiple inheritance
* C# has partial class keyword which can be used to break up class code in different files
* Generics and parametrized types are similar to templates
* Coalesce operator ("??") returns the first operator which is not null (eg a = b??0 assigns b to a)

//Hello world example in C#
public class ExampleClass
{
public static void main()
{
System.console.WriteLine("Hello World");
}
}

0 comments: