Hilfe:Quelltext
Aus Das Sopra Wiki
Mit
<source lang="sprache"> code </source>
kann Quelltext mit Syntaxhighlighting in Texte einfefügt werden. Seiten, die dieses Tag enthalten werden automatisch in die Kategorie Code-Beispiele aufgenommen.
Beispiel
<source lang="csharp">
string url = "<a href=\"" + someObj.getUrl() + "\" target=\"_blank\">l;";
// single line comments
// second single line
override protected void OnLoad(EventArgs e)
{
if(Attributes["class"] != null)
{
//_year.CssClass = Attributes["class"];
}
// base.OnLoad(e);
}
</source>
wird zu:
string url = "<a href=\"" + someObj.getUrl() + "\" target=\"_blank\">l;";
// single line comments
// second single line
override protected void OnLoad(EventArgs e)
{
if(Attributes["class"] != null)
{
//_year.CssClass = Attributes["class"];
}
// base.OnLoad(e);
}
