Formatierter Beispielquellcode

//Billiges search and replace im Clipboard
public void replaceText()
{
    if(Clipboard.ContainsText())
    {
        String text = Clipboard.GetText();

        if (!text.Equals(lastText))
        {
            lastText = text =
                  text.Replace("-01-", "-Informieren-");

            Clipboard.SetText(text);

        }
    }
}

Update: Den Code gibts wohl nicht in Farbe ?!

Update²: Es geht doch, man muss nur mal die Styles in Theme einbinden!

This entry was posted in .net. Bookmark the permalink.

2 Responses to Formatierter Beispielquellcode

  1. marco says:

    wo ist das problem? es gibt doch ein paar nette Windows Live Writer Plugins mit denen das sehr einfach geht…

  2. Fabse says:

    Marco du hast natürlich Recht ;)

    http://www.codeplex.com/Highlight4Writer

    das möchte man doch haben, dass ich da nicht selber drauf gekommen bin ?! ich war irgendwie darauf fixiert, formatiertes html irgendwo her zu holen. hm.

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *

*

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>