|
A collection of powerful and useful code snippets written in C# for .NET developers. Source code is submitted by Visual C# Kicks and website readers. We encourage you to submit your own code and rate other people's submittions. |
All C# Code Snippets are under the Visual C# Kicks license agreement
Submit a Code Snippet
Distance Calculation using Latitude and Longitude in C# ZIPCodeWorld provides this routine to calculate the distance between two points in C#.
Delete Self Allows a standalone program to delete itself.
Shuffle Lists and Arrays An in-place algorithm to randomly shuffle a list or array in C#
Print Console Table Allows a Console App to create a basic table (with headers)
TinyUrl Updater Allows you to update a standalone app using TinyUrl
C# Distance Formula A simple implementation of the distance formula in C#
C# Combination Function A simple function to calculate the number of possible combinations.
Degrees To Point and Back Convert an angle in degrees into an XY-coordinate point and back.
Data to CSV Write a DataTable or a DataView to a CSV file
Temporary File C# Class Easily handle temporary file management in C#
Taking Screenshots with C# Using API calls in C# to capture an image of the monitor screen.
Periodic Table in string[][] Array Has every known element in a two dimensional array
Multilevel Hierarchy - Class Interface An example of a multilevel hierarchy using class interfaces
C# Fraction Structure A C# struct to represent decimal numbers as fractions.
Sort Strings by Length Sort a collection of strings by their length, from shortest to longest.
Linq Objects Querying linq objects
C# Encryption Class Class to easily encrypt strings and other types of data.
RNGCryptoServiceProvider Random Integer Generate a random integer in a range using the RNGCryptoServiceProvider class.
C# Factorial Calculate the factorial value of a number in C#.NET
PHP Time Returns time represented in the same way as the PHP time() function.
Submit a Code Snippet