Welcome To Snipplr


Everyone's Recent C# Snippets



Verify that the Execute("ping") method is never called.
0 561 posted 7 years ago by heathbo
API Controller for Azure Mobile Services with DocumentDB as the backend.
0 442 posted 7 years ago by giventocode
Document Entity Domain Manager for Azure Mobile Services
0 436 posted 7 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 468 posted 7 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 870 posted 7 years ago by misholson
来自StockTrader Dbloader
0 330 posted 7 years ago by gujingshui
Note: change build Action of file to resource
0 386 posted 7 years ago by vhdm
don't forgot to add capability ID_CAP_IDENTIFY_DEVICE
0 333 posted 7 years ago by vhdm
for save settings in windows phone
0 308 posted 7 years ago by vhdm
Credit: Tim Schmelter
0 359 posted 7 years ago by RhinoX64
Copy from one object to another of the same type
0 701 posted 7 years ago by rralhan
The code to verify that a method was called. The this.mockProvider.Verify verifies that GetBiAutoProcessConfigByKeys is called.
0 452 posted 7 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 823 posted 7 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 660 posted 7 years ago by heathbo
This snippets regards a couple of extension methods to verify if a specified datetime is into a range.
0 368 posted 7 years ago by dancerjude
How to submit a form asynchronously and get result in JSON
0 408 posted 7 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 351 posted 7 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 538 posted 7 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 495 posted 7 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 722 posted 7 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 433 posted 7 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 822 posted 7 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 595 posted 7 years ago by johansonkatherine
http://www.dotnetfunda.com/articles/show/131/datatable-adding-modifying-deleting-filtering-sorting-rows-readingwrit
0 291 posted 8 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 448 posted 8 years ago by Rick
behavior for validating numeric input
0 365 posted 8 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 326 posted 8 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 448 posted 8 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 243 posted 8 years ago by negzero7
Boilerplate for DNN editor
0 324 posted 8 years ago by box86rowh