Script.NET

Scripts. NET or S # is a programming language, the mechanisms of metaprogramming uses. It represents functionalities that allow to execute scripts in the Microsoft environment. NET and change during the term. The syntax is very strongly influenced by JavaScript.

Metaprogramming

In scripts. NET inter alia exists the special operator < [ code ]>, which returns the AST of a program. On the AST of the current program can be accessed prog about the object, as the following example shows:

/ / Create AST, of a MessageBox with the phrase " Good day! " outputs ast = < [ MessageBox.Show ( ' Good day! '); ]>;   Append / / program code to the current program prog.AppendAst ( ast ); Examples

Hello, World!

MessageBox.Show ( " Hello, world! '); bubblesort

Pay = [5, 9, 1979, 23, 9, 1979 ];   for (i = 0; i < zahlen.Length; i ) {      for (j = i 1; j < zahlen.Length j )      {          if ( numbers [j ] < numbers [i])          {              / / Replace                temp = numbers [i ];              pay [i ] = numbers [j ];              pay [j ] = temp;          }      } }   / Create / output output = ' result :'; for (i = 0; i < zahlen.Length; i ) {      if ( i> 0)          output = output ',';        output = output pay [i ]; }   MessageBox.Show ( output); RSS Feeds

Rss = new XmlDocument (); rss.Load ( ' http://www.tagesschau.de/xml/tagesschau-meldungen ');   MessageBox.Show ( ' tagesschau.de messages :');   / / Print title of all existing topics / messages foreach ( feed in rss.SelectNodes ('/ rss / channel / item / title') )      MessageBox.Show ( feed.InnerText ); see also

  • Microsoft. NET
  • List of. NET languages
  • Script.NET On- Line
  • Programming language
  • . NET
699080
de