Welcome To Snipplr
Everyone's Recent C# Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
API Controller for Azure Mobile Services with DocumentDB as the backend.
0
948
posted 10 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
977
posted 10 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
2003
posted 10 years ago by misholson
The code to verify that a method was called.
The this.mockProvider.Verify verifies that GetBiAutoProcessConfigByKeys is called.
0
1007
posted 10 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
1668
posted 10 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
1330
posted 10 years ago by heathbo
How to submit a form asynchronously and get result in JSON
0
947
posted 10 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
821
posted 10 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
1311
posted 10 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
1006
posted 10 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
2054
posted 10 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
1012
posted 10 years ago by Reiff
C#
C#/.NET Code Samples to Save Microsoft OneNote (.one) file as an image (.PNG, .BMP, .JPEG, .GIF) file
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
1827
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
1393
posted 10 years ago by johansonkatherine
http://www.dotnetfunda.com/articles/show/131/datatable-adding-modifying-deleting-filtering-sorting-rows-readingwrit
0
689
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
1016
posted 11 years ago by Rick
Simple C# library that can be used to test xml. Test rules are defined in the form of xml file.
0
775
posted 11 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
1057
posted 11 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
574
posted 11 years ago by negzero7
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
759
posted 11 years ago by wraith808