Source Code for Me (s-c.me)

Allows you to paste souce code to blogs! Adapted for Twitter! Here is Search Form in case you missed your code.
Tags: CSharp,Program,MouseEventComparer,Event,MouseEventArgs, Created At: 10/24/2016 8:20:40 PMViews:

HTML view:
Copy Source | Copy HTML
  1. using System;
  2. // A single line comment starting at the beginning of the line
  3. using System.IO;
  4. /* A comment block starting at the beginning of the line */
  5. using MyNamespace;
  6.  
  7. namespace CSharpTest
  8. {
  9.     // A comment containing what looks like a "string"
  10.     // A comment containg /* what looks like */ a block comment
  11.     /* A multiline comment
         * also containing a // regular comment
         * And containing what looks like a "string"
         */
  12.  
  13.     public class Program
  14.     {
  15.         /// <summary>
  16.         /// An XML comment <see cref="System.String" />.
  17.         /// </summary>
  18.         public static void Main()
  19.         {
  20.             int Int; // case sensitive test
  21.             int @int; // escaping test
  22.             Console.WriteLine("A string \" \\\" hello \t\\");
  23.             Console.WriteLine("A string containing what // looks like a comment."); // followed by a real comment
  24.             Console.WriteLine(@"An @ string"" \"); /* and another comment */
  25.             Console.WriteLine(@"Another @ string """"");
  26.             Console.WriteLine("{0} {1} {2}", "more than one\\", /* embedded comment */ @"string on ""the same", "line");
  27. #if PREPROCESSORTEST
  28.             for( int x =  0; x < 10; ++x )
  29.             {
  30.                 Console.WriteLine('x');
  31.                 Console.WriteLine('\'');
  32.                 Console.WriteLine('\\');
  33.             }
  34. #endif
  35.         }
  36.  
  37.         public static void Linq()
  38.         {
  39.             IObservable<Event<MouseEventArgs>> draggingEvent =
  40.                 from mouseLeftDownEvent in control.GetMouseLeftDown( )
  41.                 from mouseMoveEvent in control.GetMouseMove( ).Until( control.GetMouseLeftUp( ) )
  42.                 let comparer = new MouseEventComparer( mouseMoveEvent )
  43.                 group mouseMoveEvent by comparer into cluster
  44.                 select cluster;
  45.         }
  46.     }
  47. }

Based on Manoli.Net's CodeFormatter. Made by Topbot (c) 2008-2018