Results 1 to 5 of 5

Thread: More of a forum question

  1. #1

    Thread Starter
    Hyperactive Member francisstokes's Avatar
    Join Date
    May 2005
    Location
    Kent, England
    Posts
    272

    More of a forum question

    How do post highlighted C# code here?

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: More of a forum question

    I'm afraid that there isnt a C# highlighter built-in to the forum software (the VB one is specially made, and causes hassles during upgrades!).

    Most people just post in normal Code tags, however if you use FireFox you can use the wonderful VBForumExtension (linked from post #2 here), which includes its own highlighters for several languages including C#.

    This is a sample of the output (code taken from a random post):
    Code:
    private void Button1_Click(object sender, System.EventArgs e)
    		{MailMessage mail = new MailMessage();
    
    			string strto;
    			strto=TextBox1.Text;
    				
    			string strfrom;
    			strfrom = TextBox2.Text;
    
    			string strsubject; 		
    			strsubject = TextBox3.Text;
    
    			string strbody;
    			strbody = TextBox3.Text;
    
    			mail.From=strfrom;
    			mail.To=strto;
    			mail.Subject=strsubject;
    			mail.Body=strbody;
    			//mail.Cc=strcc;
    			mail.BodyFormat=MailFormat.Html;
    			SmtpMail.Send(mail);
    		}

  3. #3

    Thread Starter
    Hyperactive Member francisstokes's Avatar
    Join Date
    May 2005
    Location
    Kent, England
    Posts
    272

    Re: More of a forum question

    thanks i was looking for this

  4. #4
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: More of a forum question

    thanks - another neat feature i may add to my own forum some day - one for C# for IE

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: More of a forum question

    Don't forget to resolve your thread from the Thread Tools menu.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width