home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
General Forums
Website/Forum/Wiki Feedback
syntax highlighting for C# and C++ is falling back to C
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Vasilich" data-source="post: 1165202" data-attributes="member: 97516"><p>[code=csharp]using System;</p><p>using System.IO;</p><p>// comment</p><p>/* more</p><p> multiline</p><p> comment */</p><p>#pragma warning disable 414, 3021</p><p>public class Program</p><p>{</p><p> /// <summary>The entry point to the program.</summary></p><p> public static int Main(string[] args)</p><p> {</p><p> Console.WriteLine("Hello, World!");</p><p> string s = @"This</p><p>""string""</p><p>spans</p><p>multiple</p><p>lines!";</p><p> dynamic x = new ExpandoObject();</p><p> x.MyProperty = 2; X = 0b01010001 + 44L;</p><p> return 0xFF;</p><p> }</p><p>}</p><p>async Task<int> AccessTheWebAsync()</p><p>{</p><p> string urlContents = await getStringTask;</p><p> return urlContents.Length;</p><p>}</p><p>internal static void ExceptionFilters()</p><p>{</p><p> try</p><p> {</p><p> throw new Exception();</p><p> }</p><p> catch (Exception e) when (e.Message == "My error") { }</p><p>}[/code]</p><p>[code=cpp]#include <iostream></p><p>#define IABS(x) ((x) < 0 ? -(x) : (x))</p><p>int main(int argc, char *argv[]) {</p><p> /* An annoying "Hello World" example */</p><p> for (auto i = 0; i < 0xFFFF; i++)</p><p> cout << "Hello, World!" << endl;</p><p> char c = '\n';</p><p> unordered_map <string, vector<string> > m;</p><p> m["key"] = "\\\\"; // this is an error</p><p> return -2e3 + 12l;</p><p>}[/code]</p><p>fine, works</p></blockquote><p></p>
[QUOTE="Vasilich, post: 1165202, member: 97516"] [code=csharp]using System; using System.IO; // comment /* more multiline comment */ #pragma warning disable 414, 3021 public class Program { /// <summary>The entry point to the program.</summary> public static int Main(string[] args) { Console.WriteLine("Hello, World!"); string s = @"This ""string"" spans multiple lines!"; dynamic x = new ExpandoObject(); x.MyProperty = 2; X = 0b01010001 + 44L; return 0xFF; } } async Task<int> AccessTheWebAsync() { string urlContents = await getStringTask; return urlContents.Length; } internal static void ExceptionFilters() { try { throw new Exception(); } catch (Exception e) when (e.Message == "My error") { } }[/code] [code=cpp]#include <iostream> #define IABS(x) ((x) < 0 ? -(x) : (x)) int main(int argc, char *argv[]) { /* An annoying "Hello World" example */ for (auto i = 0; i < 0xFFFF; i++) cout << "Hello, World!" << endl; char c = '\n'; unordered_map <string, vector<string> > m; m["key"] = "\\\\"; // this is an error return -2e3 + 12l; }[/code] fine, works [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
General Forums
Website/Forum/Wiki Feedback
syntax highlighting for C# and C++ is falling back to C
Contact us
RSS
Top
Bottom