c# Programming Glossary: dummy
How does the C# compiler detect COM types? http://stackoverflow.com/questions/1093536/how-does-the-c-sharp-compiler-detect-com-types void Foo ref int x class Test static void Main Dummy dummy null dummy.Foo 10 I'd like to be able to write Dummy dummy.. ref int x class Test static void Main Dummy dummy null dummy.Foo 10 I'd like to be able to write Dummy dummy new Dummy though... null dummy.Foo 10 I'd like to be able to write Dummy dummy new Dummy though. Obviously it'll go bang at execution time..
How do you serialize a string as CDATA using XmlSerializer? http://stackoverflow.com/questions/1379888/how-do-you-serialize-a-string-as-cdata-using-xmlserializer get set XmlText public XmlNode CDataContent get var dummy new XmlDocument return new XmlNode dummy.CreateCDataSection.. get var dummy new XmlDocument return new XmlNode dummy.CreateCDataSection Content set if value null Content null..
Cast to Anonymous Type http://stackoverflow.com/questions/1409734/cast-to-anonymous-type private static void TestMethod Object x This is a dummy value just to get 'a' to be of the right type var a new Id 0..
Keeping ASP.NET Session Open / Alive http://stackoverflow.com/questions/1431733/keeping-asp-net-session-open-alive question I use JQuery to perform a simple AJAX call to a dummy HTTP Handler that does nothing but keeps my Session alive function..
Slow SoapHttpClientProtocol constructor http://stackoverflow.com/questions/172095/slow-soaphttpclientprotocol-constructor the extra 1.5 seconds are a problem one could try to do a dummy instantiation of this class at the beginning of the application..
How to generate an image from text on fly at runtime http://stackoverflow.com/questions/2070365/how-to-generate-an-image-from-text-on-fly-at-runtime Font font Color textColor Color backColor first create a dummy bitmap just to get a graphics object Image img new Bitmap 1.. SizeF textSize drawing.MeasureString text font free up the dummy image and old graphics object img.Dispose drawing.Dispose create..
BackgroundWorkers never stop being busy http://stackoverflow.com/questions/2183520/backgroundworkers-never-stop-being-busy a simple solution.. edit request Actually it was only a dummy parameter i removed it and forgot to get it out I only use it..
Unit testing void methods? http://stackoverflow.com/questions/246038/unit-testing-void-methods be easily verified by providing the first method with a dummy file and expected strings. The second one is slightly tricky....
How can I return NULL from a generic method in C#? http://stackoverflow.com/questions/302096/how-can-i-return-null-from-a-generic-method-in-c a generic method in C# I have a generic method with this dummy code yes I'm aware IList has predicates but my code is not using..
Get Size of file on disk http://stackoverflow.com/questions/3750590/get-size-of-file-on-disk string file FileInfo info new FileInfo file uint dummy sectorsPerCluster bytesPerSector int result GetDiskFreeSpaceW.. out sectorsPerCluster out bytesPerSector out dummy out dummy if result 0 throw new Win32Exception uint clusterSize.. out sectorsPerCluster out bytesPerSector out dummy out dummy if result 0 throw new Win32Exception uint clusterSize sectorsPerCluster..
'Delegate 'System.Action' does not take 0 arguments.' Is this a C# compiler bug (lambdas + two projects)? http://stackoverflow.com/questions/4466859/delegate-system-action-does-not-take-0-arguments-is-this-a-c-sharp-compiler instead of System.Action results in the same error Using a dummy parameter Action double int results in the same error Project..
How do I convert Word files to PDF programmatically? http://stackoverflow.com/questions/607669/how-do-i-convert-word-files-to-pdf-programmatically C# doesn't have optional arguments so we'll need a dummy value object oMissing System.Reflection.Missing.Value Get list.. method Object filename Object wordFile.FullName Use the dummy value as a placeholder for optional arguments Document doc word.Documents.Open..
Is there an equivalent to the Scanner class in C# for strings? http://stackoverflow.com/questions/722270/is-there-an-equivalent-to-the-scanner-class-in-c-sharp-for-strings bool hasNextInt if currentWord null return false int dummy return int.TryParse currentWord out dummy public int nextInt.. return false int dummy return int.TryParse currentWord out dummy public int nextInt try return int.Parse currentWord finally.. bool hasNextDouble if currentWord null return false double dummy return double.TryParse currentWord out dummy public double nextDouble..
png to bmp http://stackoverflow.com/questions/1060442/png-to-bmp c# image png bmp share improve this question Image Dummy Image.FromFile image.png Dummy.Save image.bmp ImageFormat.Bmp..
How does the C# compiler detect COM types? http://stackoverflow.com/questions/1093536/how-does-the-c-sharp-compiler-detect-com-types 00012345 0000 0000 0000 000000000011 public interface Dummy void Foo ref int x class Test static void Main Dummy dummy.. Dummy void Foo ref int x class Test static void Main Dummy dummy null dummy.Foo 10 I'd like to be able to write Dummy.. dummy null dummy.Foo 10 I'd like to be able to write Dummy dummy new Dummy though. Obviously it'll go bang at execution..
How can I make an ActiveX control written with C# raise events in JavaScript when clicked? http://stackoverflow.com/questions/1455577/how-can-i-make-an-activex-control-written-with-c-sharp-raise-events-in-javascrip int index public event OnMouseClickHandler OnMouseClick Dummy Method to use when firing the event private void MyActiveX_nMouseClick..
Check if an application is idle for a time period and lock it http://stackoverflow.com/questions/1541981/check-if-an-application-is-idle-for-a-time-period-and-lock-it static extern bool GetLastInputInfo ref LASTINPUTINFO Dummy DllImport Kernel32.dll private static extern uint GetLastError..
Creating a Huge Dummy File in a Matter of Seconds in C# http://stackoverflow.com/questions/1881050/creating-a-huge-dummy-file-in-a-matter-of-seconds-in-c-sharp a Huge Dummy File in a Matter of Seconds in C# I want to create a huge dummy..
Comparing 2 objects and retrieve a list of fields with different values http://stackoverflow.com/questions/3060382/comparing-2-objects-and-retrieve-a-list-of-fields-with-different-values DateTime.Today Z null new Foo X 123 Y DateTime.Now Z new Dummy WriteDeltas new Bar X 123 Y DateTime.Today Z null new Bar.. DateTime.Today Z null new Bar X 123 Y DateTime.Now Z new Dummy static void WriteDeltas T T x T y Console.WriteLine foreach.. T .GetDeltas x y Console.WriteLine delta class Dummy class Foo public int X get set public DateTime Y get set public..
Converting .dds to .png: is XNA really this convoluted? http://stackoverflow.com/questions/3849161/converting-dds-to-png-is-xna-really-this-convoluted . Then you can do this Form form new Form Dummy form for creating a graphics device GraphicsDeviceService gds..
|