How to Use

Nov 26, 2010 at 5:07 AM

how to use colorcode with my .net blog i just downloaded dll and no idea? please if you can tell me the way to use this software!!!

Jan 6, 2011 at 6:21 PM

Hello gayancc,

The simplist case is taking some text and colorizing it. There is a code sample on the home page of the project, but here it is:

string colorizedSourceCode = new CodeColorizer().Colorize(yourSourceCode, Languages.CSharp);

If you want to do something else, like add support for a new language or change how the text is colorized, for instance, please let me know and I can provide a sample.

I hope this helps!

Cheers, Drew 

Jan 7, 2011 at 1:53 AM

hi drewmiller

thank you very much for the kind reply and all i want to do is i'm currently developing extension for my blog (dotnetblogengine). so i don't like javascript syntax highlighter colorize. OK i'll try this thanks again.

Aug 22, 2011 at 1:57 PM

Hi,

I am new to .net. How can i use the colorcode.

I write something in my code

 

string filecontent = File.ReadAllText(nodefullpath); 

string colorizedSourceCode = new CodeColorizer().Colorize(filecontent, Languages.Html);

htmleditor.Text = colorizedSourceCode;

where htmleditor is a multiline textbox. But i didn't get the colored code in this textbox. where i am doing wrong please help me...

 

Aug 22, 2011 at 2:27 PM

Hi,

I try with following code

string filecontent = File.ReadAllText(nodefullpath); 

string colorizedSourceCode = new CodeColorizer().Colorize(filecontent, Languages.Html);

htmleditor.Text = colorizedSourceCode;
but i am unable to get the colored syntax. can you please provide a sample for the same.
Regards
gsknbabu