Welcome To Snipplr


Everyone's Recent C# Snippets



Verify that the Execute("ping") method is never called.
0 979 posted 9 years ago by heathbo
API Controller for Azure Mobile Services with DocumentDB as the backend.
0 740 posted 9 years ago by giventocode
Document Entity Domain Manager for Azure Mobile Services
0 732 posted 9 years ago by giventocode
I have completed my code my its giving me The remote server returned an error: (500) Internal Server Error. I been trying with Get and Post method but not luck, can anyone help me to view what I could doing wrong? Here you have my code, as you can se...
0 794 posted 9 years ago by guru2015
This snippet provides Enum codes for ISO 639-3 Language Codes. One might be inclined to use the CultureInfo class, but according to http://stackoverflow.com/questions/21042081/cultureinfo-and-iso-639-3 there is no direct mapping. If you need this for...
0 1684 posted 9 years ago by misholson
来自StockTrader Dbloader
0 571 posted 9 years ago by gujingshui
Note: change build Action of file to resource
0 677 posted 9 years ago by vhdm
don't forgot to add capability ID_CAP_IDENTIFY_DEVICE
0 623 posted 9 years ago by vhdm
for save settings in windows phone
0 561 posted 9 years ago by vhdm
Credit: Tim Schmelter
0 716 posted 9 years ago by RhinoX64
Copy from one object to another of the same type
0 1344 posted 9 years ago by rralhan
The code to verify that a method was called. The this.mockProvider.Verify verifies that GetBiAutoProcessConfigByKeys is called.
0 807 posted 9 years ago by heathbo
The ExpectedException section under [TestMethod] is where you tell Moq what type of exception your listening for. If that exception is thrown, then this test will pass and it will stop running all the code under the target.CalculateProvisionalPrice....
0 1408 posted 9 years ago by heathbo
Example 1: I'm verifying that the list that is passed in has 3 attachments. SendMail is run later in the SendEmail method. Example 2: I'm verifying that the object that is passed into the method has the appropriate values.
0 1100 posted 9 years ago by heathbo
How to submit a form asynchronously and get result in JSON
0 719 posted 9 years ago by DennisvanderStelt
StringBuilder class is a much better way to concatenate strings. Unlike a string object it can be changed as needed, and is much more efficient than using +=
0 627 posted 9 years ago by zeke
The following code sample shows how developers can replace multiple texts in a single API call in a PDF file using Aspose.Pdf for Cloud API in their applications. Developers can use Aspose REST API with any language: .NET, Java, PHP, Ruby, Rails, Pyt...
0 1055 posted 9 years ago by johansonkatherine
**Ejemplo:** Los múltiplos de 3 y 5 en el rango 0-10 son: 3, 5, 6, 9; y su suma es 23.
0 815 posted 9 years ago by g3r4
This code sample shows how C# developers can create PDF file from HTML using Aspose.Pdf for Cloud API in their REST applications.
0 1772 posted 9 years ago by johansonkatherine
You could use this snippet as an Umbraco XSLT Extension to be able to get releasedate from the Umbraco post in XSLT.
0 785 posted 9 years ago by Reiff
The Aspose.Note for .NET API allows developers to open files & manipulate elements of OneNote books & export them to PNG, GIF, JPEG, BMP and PDF formats. The following code sample shows developers how to save OneNote File as an image in C#/.NET
0 1528 posted 10 years ago by johansonkatherine
This technical tip shows how developers can split worksheets of an Excel workbook to a separate workbook, TIFF, PNG or any supported image format in the cloud. This example allows you to split all or specific worksheets of a workbook file and save ea...
0 1123 posted 10 years ago by johansonkatherine
http://www.dotnetfunda.com/articles/show/131/datatable-adding-modifying-deleting-filtering-sorting-rows-readingwrit
0 532 posted 10 years ago by thetwai
This is way to get different fg and bg colors inside 1 string. You provide escape like characters to define colors. This is a fg of #rRed #xand now we're back to normal. This is a bg of $bBlue#x and now we're back to normal. I can combine fg & b...
0 784 posted 10 years ago by Rick
behavior for validating numeric input
0 598 posted 10 years ago by dck11
Simple C# library that can be used to test xml. Test rules are defined in the form of xml file.
0 589 posted 10 years ago by ashvin8085hotmail
XmlDocument will not behave when you try to CreateCDataSection passing it a string that contains "]]>" This extension method returns an array of XmlCDataSection, each of which will contain the parts separated by "]]" and ">". Example: For the s...
0 829 posted 10 years ago by thedark
Call this method to set the intervals for a UISlider in Monotouch. You can remove the textbox parameter if you don't have them linked to sliders.
0 437 posted 10 years ago by negzero7
Boilerplate for DNN editor
0 560 posted 10 years ago by box86rowh
I wanted to create a borderless window, but still be able to move it. I thought it would be complicated, but just like a lot of things with WPF, things were simpler than I thought...
0 573 posted 10 years ago by wraith808