Insert code

In this blog have the capabilities to provide input to video. For example you can create a commentary that contains this snippet:

? Mäqälä CSharp
 1 
 2 
 3 
 4 
 5 
 6 
 7 
 8 
 9 
 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
  / / / <summary> 
  / / / Commit the INI file in memory to disk 
  / / / </ Summary> 
  public void Commit () ( 
	  ( this . fileName ) ; StreamWriter = wrt File. CreateText (this. FileName); 

	  Section currSect in this . sections ) { foreach (currSect in this Section. sections) ( 
		  ; wrt. WriteLine (); 
		  "[{0}]" , currSect. Name . Trim ( ) ) ; wrt. WriteLine ( "[(0)]," currSect. Name. Trim ()); 

		  Key currKey in  currSect. Keys ) { foreach (Key currKey in currSect. Keys) ( 
			  "{0}={1}" , currKey. Name . Trim ( ) , xString. EscapeAtypicalASCIIChars ( wrt. WriteLine ( "(0) = (1)", currKey. Name. Trim (), xString. EscapeAtypicalASCIIChars ( 
				  null ? currKey. Val! = null?  ( ) : "" ) ) ; currKey. Val. Trim (): "")); 
		  ) 
	  ) 

	  ; Wrt. Close (); 
  ) 

This is done by using the tags

<pre lang='[lenguaje]‘>[...codigo...]</pre>

In the above example, replacing "[language]" with the language you want to put qu. The header fragment C # this up, I used this tag:

<pre lang='csharp'>

To put this block of code:

? Mäqälä CSharp
 1 
 2 
 3 
  void main () ( 
	  "Hello World" ) ; Console. WriteLine ( "Hello World"); 
  ) 

Use this code:
<pre lang='csharp'>
void main() {
Console.WriteLine("Hello World");
}
</pre>

The language tags that you can use are:

abap, actionscript, ada, apache, applescript, asm, asp, autoit, bash, blitzbasic, bnf, c, c_mac, caddcl, cadlisp, cfdg, cfm, cpp-qt, cpp, csharp, css, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic, genero, gml, groovy, haskell, html4strict, idl, ini, inno, io, java, java5, javascript, latex, lisp, lua, m68k, matlab, mirc, mpasm, mysql, nsis, objc, ocaml-brief, ocaml, oobas, oracle8, pascal, per, perl, php-brief, php, plsql, python, qbasic, rails, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vb, vbnet, vhdl, visualfoxpro, winbatch, xml, xpp, z80

Share this post:
  • Digg
  • del.icio.us
  • Mixx
  • Google
  • BarraPunto
  • Meneame