CSharp

CSharp is a multi-paradigm programming language encompassing strong typing, imperative, declarative, functional, procedural, generic, object-oriented (class-based), and component-oriented programming disciplines. It was developed by Microsoft within its .NET initiative and later approved as a standard by Ecma (ECMA-334) and ISO (ISO/IEC 23270:2006). C# is one of the programming languages designed for the Common Language Infrastructure. From Wikipedia

Compile code based on csc (CSharp compiler)

Look for the compiler in c:\windows\Microsoft.NET\Framework\<version>\csc.exe

Hello world sample code:

   1 using System;
   2 
   3 namespace org.bitarus.allowed
   4 {
   5   public class Program
   6   {
   7     public static void Main(string[] args)
   8     {
   9       System.Console.WriteLine("Hello world");
  10     }
  11   }
  12 }

Compile HelloWorld.cs:

Build batch file example .NET 4.0

C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /t:library /out:libx.dll src\_Default.cs src\DALSql.cs src\Global.cs

app.config sample

   1 <?xml version="1.0" encoding="utf-8" ?>
   2 <configuration>
   3   <appSettings>
   4     <add key="keyx" value="valuex"/>
   5   </appSettings>
   6 </configuration>

   1 using System.Configuration;
   2 //.....
   3 string valuex = ConfigurationManager.AppSettings["keyx"];
   4 System.Console.WriteLine(valuex);

Copy src/app.config to AppX.exe.config.

CSharp (last edited 2013-11-25 12:24:17 by bl13-230-54)