Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Everything / Languages / C#

C#

C#

Great Reads

by wim4you
This article describes a Tabbed File Explorer with minimal functionality using only basic MVVM techniques and some attached properties. In a first article I described a MVVM Tabbed Navigation Tree, in this article I add a Tabbed Folderplane.
by Daron Cox
If you're trying to integrate with UAG from a mobile device, this tip is for you!
by Anurag Prajesh
Add new user registeration information in XML with C#
by yazanjaradat
Ant-Colony Based Routing Algorithm (ARA) C# Simulation

Latest Articles

by wim4you
This article describes a Tabbed File Explorer with minimal functionality using only basic MVVM techniques and some attached properties. In a first article I described a MVVM Tabbed Navigation Tree, in this article I add a Tabbed Folderplane.
by Daron Cox
If you're trying to integrate with UAG from a mobile device, this tip is for you!
by Anurag Prajesh
Add new user registeration information in XML with C#
by yazanjaradat
Ant-Colony Based Routing Algorithm (ARA) C# Simulation

All Articles

Sort by Score

C# 

by Daron Cox
If you're trying to integrate with UAG from a mobile device, this tip is for you!
by Anurag Prajesh
Add new user registeration information in XML with C#
by yazanjaradat
Ant-Colony Based Routing Algorithm (ARA) C# Simulation
by CPallini
How to generate a spiral numerical pattern without using arrays
by Suresh Dasari's
Auto Generate Code (CRUD) for 3 Layered architecture (Entity, Data Access & Business Layer) with Stored Procedures based on table design.
by Johan G. van der Galien
Example project template for a "Cool Towel" SPA to be filled with a MVC4 application HTML5 and JavaScript code in order to convert
by Santhosh Babu Mahimairaj
How to freeze gridview header using JQuery
by Habibur Rony
Naming Convention of Test Method for Unit Testing using Behavior Driven Development (BDD)
by deeptibansal
Adding event to Microsoft Outlook through Web Application
by Joe Programmer 1
Maximizing XOR challenge sample
by Bohdan Stupak
"Method can be static" Microsoft Code Analysis warning may hide a violation of object-oriented design
by Daniel Brousser
Custom TextBox control for UI input validation
by SoftwareMonkeys
Sometimes, it's useful to know whether you're running in debug or release mode so you can do extra work during debugging and skip it during release. This class makes that as simple as possible.
by Pablo Aliskevicius
You can make it a bit shorter: public virtual bool IsDebug { get { #if (DEBUG) return true; #else return false; #endif } }Thanks for sharing,
by Huisheng Chen
Have a look this one, I just wrote: Accurate way to tell if an assembly is compiled in debug or release mode in c#[^] public static bool IsInDebugMode(string FileName) { var assembly = System.Reflection.Assembly.LoadFile(FileName); var attributes =...
by SoftwareMonkeys
While I think alternative 3 could be quite useful I often have access to the assembly name and not the actual file name.For example the assembly name might be:Company.ProductWhereas the file name might be:Company.Product.dllThere are times when I'll fully qualify a class such...
by Andreas Gieriet
I prefer the [Conditional("DEBUG")] attribute over #if DEBUG.This is especially advised for your logging example.E.g.[System.Diagnostics.Conditional("DEBUG")]private void Validate() { /* check instance integrity */ }or[System.Diagnostics.Conditional("DEBUG")]public static...
by Tomaž Štih
How to (dynamically) implement ToString() as a Lambda function
by Pranay Rana
(Linq and Nullable Values) OR (SQL ISNULL with LINQ)
by Pedram_Niloufari
C# .Gif viewer / Snipper control
by sumit_kapadia
Simple and free approach to manage your code on cloud with git-SCN and dropbox
by #realJSOP
Don't reinvent the wheel - use the one that's already on the cart.
by TheGreatAndPowerfulOz
The following is far easier to understand and use than the Outlaw's tip (IMHO).text = Regex.Replace(text, "screen_fadetimeout=\"[^\"\']+\"", "screen_fatetimeout="99");It has the following advantages:1. It is one line of code2. It is easier to read3. It is faster (note: XmlElement...
by Sarang Date
Any string input can have these many possible states1) String is null2) String is empty3) String contains nothing but white space4) String has some contentTill now, .NET had static method for stringbool string.IsNullOrEmpty()which handled first two conditions for...
by jfriedman
public static class StringExtensions { public static bool IsNullOrWhitespace(this string s) { if (null == s) return true; return string.IsNullOrEmpty(s.Trim()); } }
by JBildstein
Reading and writing Bitmaps with full 16bit per channel (and possibly more)
by Peter T. Ringering
A program that makes editing code comments and XML comments easier.
by Vinayaka Krishna Shenoy
.NET Coding Best Practices - Vinayak's thumb rulesDo not hard code strings/ numerics. Instead of that use constants as shown below.Bad practice int Count; Count = 100; if( Count == 0 ) { // DO something… }Good practice int Count; Count = 100; private...
by Member 12660776
Programmatically Adding New ConfigurationSectionGroup Corrupts Declaration Section With Multiple Group Declarations.
by Victor Sirghii
On the parent razor page, we add Partial View which will serve as the updatable container. On Ajax calls from the parent page, we update only Partial view content, not the whole page, thus creating a smooth user interaction experience.
by M.M.Mohseni
In this article, we'll explain how to register (Add) all specific interface assignable types in an assembly and will use them in a class.
by RickZeeland
Version all your .NET Core projects in one swoop fell!
by Etienne Louise (974)
In this article I'll show how to create custom culture and then show an exemple of how to use it in an ASP.Net MVC application.
by SimbarasheM
A .NET v4 Library for converting DataTable row(s) to JSON String for WCFServices
by Pavel Durov
Tip about converting .NET DateTime to Unix double timestamp and vise versa - on .NET
by Jon_Slaughter
Simple class to encapsulate a double reference
by B.O.B.
How to get correct caret position from Textbox control
by Yaseer Mumtaz
.NET interview questions and answers with real world examples and code snippets
by Zzzzzoltan
A novel solution to the 32 vs 64-bit DLL interop problem
by Amir Hamza Md. Kayes
.NET interprocess communication using named pipe
by rmostafa
Simple Google Analytics Access, with Service Account Credential OAuth2
by Dmitry Orzhevsky
This article dives into .NET method inlining topic and shed some light on one particular case when CLR is more likely to inline method - looping.
by Vinayaka Krishna Shenoy
.Net Performance tip - 2
by DaveAuld
Here is a better evaluation of performance in .Net of the If / Switch operations;http://www.blackwasp.co.uk/SpeedTestIfElseSwitch.aspx[^]
by Vinayaka Krishna Shenoy
.Net Performance tip - 3
by Ben Hall (failingfast.io)
Micro-Benchmarking Your C# - Pitfalls and A Tool To Help You Mitigate Them
by emadns
A basic tutorial for ReportMax tool
by emadns
Second tutorial for loading data through code - Sqlite
by emadns
Using the Chart control in ReportMax
by Bismark Appah
.NET Runtime Library for Delphi
by Peter Piotti
A clean, simple alternative to using the Entity Framework for stored procedures data access in a .NET/SQL Server environment
by Daan Acohen
An explanation of how to support multiple platforms in .NET development
by S. M. Ahasan Habib
.NET TransactionScope and its default Transaction Isolation level issue.
by Nikita D. Sinelnikov
HowTo: make the report background (elements) of Microsoft .NET Report (.rdlc) non-printable
by BrokenEvent
.NET WinForms Tray icon implemenation with Win7 and Vista features: GUID identification, large custom icons, custom UI instead of the hint, etc.
by Yaseer Mumtaz
XML input parameter to RESTful API using HttpClient and bypassing the SSL certificate
by Alberto M.
Zlib compress / decompress implementation using .NET 4.5.1, with no external DLLs
by Muthu Nadar
This article will explain about null coalescing operator along with its advantage and disadvantage.
by Nadege Rouelle
How to add initialization data when configuring Entity Framework Code First.
by Dave “DWC” Curry
How to wire up drag+drop events through multiple objects.
by Savalia Manoj M
How to create custom Datapager Usercontrol in Silverlight?
by The Zakies
Part 3 of a tutorial to show a graphics program using C# using GDI and SVG drag and drop and delete objects
by The Zakies
we will build an outline line around the drawn lines so we would test the mouse click on this outline to know which line is selected. and we would in the coming update build a select function inside the move tool
by The Zakies
in this tut we will create a technique to enable the user to control points within a drawn line, by drawing circles around points of the line , when the user clicks a circle he would control the corresponding point.
by The Zakies
we would create Hand_tool to pan through the drawing form, and we would use a custom cursor of open and closed hands
by The Zakies
we will continue the functionality of the hand tool with having a navigator panel which works as a map, we will also have a red rectangle which tells the user where he is actually viewing inside the whole form, also it can be moved to pan the form
by The Zakies
Tutorial 1 (how to create a vector graphics program)
by The Zakies
[tut4] how to draw lines & to draw different types on end shapes like rectangle and circle using C#
by The Zakies
Learn how to implement a tecnique of a parent form that createes and controls other forms , through the tecnique of using the tab control, also learn how to implement a menu for the tools, and how to add cutom cursor for each tool
by Georgeutc
A very simple Resizable SplitView
by Louis_Liu
WPF application to capture screen.
by qlipoth
All too often, I have to match disparate objects 1 to 1
by thatraja
Display Date Time in 12/24 hour time format in C#/VB.NET
by Michael Bogaerts
What brings the 15.2 release for XAF (win) developers
by simonp_ca
How to remove Windows service from Service List (not just stop/disable it, but to delete it from the list totally)
by charles922
Use of the Trapezoidal Rule to integrate a function
by Sumit Chawla
2-Legged OAuth Authentication in .NET (C#)
by JatinKhimani
Develop a web application in 3 layer architecture code style
by GPUToaster™
A simple way to detect bitness of an OS Programatically. (C# and C++ examples given)
by Reinhard Ostermeier
In .NET 4.0, you can also use the new System.Environment.Is64BitOperatingSystem and System.Environment.Is64BitProcess
by Aescleal
In C++ you can use the size of a pointer to work out what sort of process you're running in:bool is_64_bit(){ return sizeof(void *) == 8;}This has got the advantage of being portable and you don't have to call any OS functions.You can do something similar in C - just return...
by a_pess
To check 64Bit Operating system in VB.NET,Public Shared Function is64BitOPeratinSystem() As Boolean Return (Marshal.SizeOf(IntPtr.Zero) = 8)End Function
by The_Mega_ZZTer
Version check is wrong. It happens to work correctly only because no minor versions of Windows 5 were released after 5.1 (AFAIK... are Windows Server 2003 and Embedded XP and Media Center XP still 5.1?). A theoretical version 5.2 would fail the check. I submit the following...
by AnobikDey
A description of how images and other controls can be rotated and used to give 3d Effect in Windows Store Apps
by charles922
3D programming with OpenGl and C# to create an interactive puzzle
by Prasanna Venkatesh . K
Writing a Windows store background app from the scratch
by Calabash Sisters
This article aims at talking about some useful solutions for you to merge to multiple excel worksheets into one.
by comiscience
4 ways to do Object copy
by Revanth Ramesh
Futuristic Talking 7-Segment Time Display Widget in WPF
by saad_lah
Complete guide for beginner to setup EmguCV project and run first program in Visual Studio
by toneware
A utility that monitors a selected directory for changes
by Jens Theisen
A grid splitter separating four quadrants
by Jeong, WonYoung(Brad)
Making BitField with C# alternative to BitField made with union and struct of C++
by charles henington
Simple user defined Cipher Transform that I got the idea from https://www.codeproject.com/Articles/5319044/ARC4-Encryption-Library
by SrikantSahu
This is a simple application developed using C# MVC and jquery for basic CRUD operations. The application can be unit tested using selenium web drivers.
by MarcusCole6833
A basic tutorial on how to Use WCF service with the Entity Framework
by Math08avan
A simple example for CRUD actions using WCF service in ASP.NET
by Darryl Bryk
C# code for a low-pass Butterworth filter is presented
by TheGreatAndPowerfulOz
How to recursively select all descendants using an extension method
by OriginalGriff
If you haven't heard of AI Memo 239, then you need to have a look at it. It is an MIT memo from 1972 containing "clever code" and such like. Some of it is absolutely beautiful!
by Ian Shlasko
Unless I'm misreading your code on CodePlex, it looks like your utility loads in the entire file every time it changes. That might be fine for tiny files, but it would be a huge performance hit for larger ones (a few megs, for example).Why not do it a bit more simply?using (FileStream str...
by Michiel du Toit
Code for a C# string.Like extension method.
by sx2008
An easy-to-use class to prevent multiple instances of your application from opening and focusing/activating the first instance window.
by Graham Wilson
A collection of simple .NET Framework/.NET WinForm controls and utilities.
by YOSSI ROZENBERG
A computational statistics class in C#
by honey the codewitch
Easily add progress reporting to your console apps
by David_Cui
To introduce a free library to save some tedious work for writing tedious filtering logic
by Clifford Nelson
There is a Parse and TryParse for fields, but they cannot be used for properties. Here is a concept to create TryParse that will work for properties.
by RickZeeland
A Custom Flat-style Numeric UpDown Control with a simple demo application written in .NET 6
by cesar_boucas
A custom derivative of ServiceHostFactory to control how WCF service hosts are created.
by Pascal Ganaye
A custom C# string implementation that stores its data in a UTF8 byte array.
by Niladri_Biswas
This short article will demonstrate an idea of making a custom switch case in C#
by Gregory Morse
Custom TAUS Data Provider to allow increased multilingual support using Google Translate's web interface
by Dirk Bahle
Making better use of the available UI space.
by Erik Nagel
Usable demo demonstrating some aspects of application architecture
by Sambhav Yadav - Sam D Silva
ASP.NET page/master page/user control's life cycle from the perspective of Session and View State
by honey the codewitch
A handy code snippet that can set indentation levels while rendering multipart documents with a TextWriter
by Andrey Sitaev
Here I placed source files, binaries and brief instructions for FastGrid control.
by Frank T. Clark
Improving file transfer speed for large files
by honey the codewitch
BinaryReader needs a better way to read strings and types. Here's a quick and dirty fix
by Afzaal Ahmad Zeeshan
This tip is to provide an overview of writing strings in ASP.NET web applications to avoid concatenations.
by Vasily Tserekh
A list of the problems I had to address and how I solved them
by OriginalGriff
Recently, I had to write a quick app to load images into a database, and wanted to restrict the file type to just images. You can do this with the OpenFileDialog.Filter property, but it is a pain working out what file extensions to permit.
by Bruce Greene
A bare-bones Find and Replace tool for AvalonEdit
by wim4you
We wanted a first impression of a clockwork using simple gear for visual evaluation. A provisory prototype is made.
by PIEBALDconsult
A Trim method for strings that provides flexibility without requiring the use of large character arrays
by Nuwan Karunarathna
This a foldable content control for UWP platform.
by Southmountain
This tip shares some lessons and thoughts after using this converter.
by GAMerritt
A C# method which rounds to the nearest multiple of a chosen power of an arbitrary base.
by shijo joseph
An ADO.NET Layer for SQL Server and Oracle which makes it easier for interfacing with database
by honey the codewitch
A circular buffer implementing IList
by #realJSOP
You probably have better things to do than writing tedious comparison methods.
by Mohammad A Rahman
by Ian Good
A possibly simpler version of this is to create an extension method for strings:public static class MyExtensions{ public static TEnum ParseEnum(this string value, bool ignoreCase = false) where TEnum : struct { TEnum tenumResult; ...
by Mohammad A Rahman
The ParseEnum method will not work where we use a version below .NET Framework 4.0 because of the TryParse method. So those who need to use it in below .NET Framework 4.0 or in .NET Framework 4.0, the following extension methods will be helpful:public static TEnum ParseEnum(this...
by S. M. Ahasan Habib
I will demonstrate a generic factory method which will create object from interface type parameter from an assembly (either current or provided) with the help of reflection
by OriginalGriff
Getting an image from a database and displaying it in an ASP.NET page is something we have to do quite often. Here is a generic class which does the job for you.
by Senthilvel Samatharman
This tip provides a simple implementation for the ICommand interface and enables to write quick code leaving the nuances of fetching the return types and asynchrony
by Abhishek Kumar Goswami
Generic Library for Accessing and Creating Microsoft Project Plan File
by honey the codewitch
A fully generic ordered dictionary class in C#
by Mohammad A Rahman
A Generic Ternary Operator for value types and parameterless method
by Herbert Lausmann
An IconBitmapEncoder that produces high-quality icons, written in VB.NET and C#, WPF
by shijo joseph
A file backup manager with simple user interface and all the essential functionalities.
by Espen Harlinn
Stuff I've found useful and interesting
by Begench Amanov
BaseAdapter that removes the need for some tedious coding
by S.Prateek
This is a fun and short tutorial to try face detection on Windows Phone using FaceDetectionWP8 library.
by RickZeeland
An easy way to edit and exchange XML config settings
by Jarno Burger
A managed wrapper around FreeFrame, to give your video frames some cool effects
by Sitang Ruan
How to display a spinner with disabled background when doing postback or Ajax call
by agent154
A method to move rows within a DataTable
by johannesnestler
Nice solution agent154, I'd just suggest to implement it as extension methods for data row: (and I don't liked your "error reporting" with the '0' Value - because '0' could be a valid index). But I have to say, even if you don't have a database behind the datatable you can use sorting (LINQ,...
by Michael Bergman
Using Windows Communication Foundation to build a simple web server
by paladin_t
A Mimetic C# Style Multicast Event Implementation with C++
by Alessandro Lentini
How to write a simple multi-thread queue for the typical producer-consumer process
by Akash Gutha
This tip is aimed at providing a simple solution for simple page to page navigation system for your UWP apps.
by RickZeeland
Creating a custom GroupBox in WinForms that supports skinning
by Marlon Hizole
An elegant approach to pagination
by ryowu
A game that shows how to use C# drawing and how to create 2D anime.
by shijo joseph
An easy to implement yet powerful logging library which requires absolute zero learning curve
by UberGeoff
This tip explains how to display a jQuery modal pop-up message using server side events.
by RickZeeland
PostgreSQL notifications Windows Forms application
by Blaž Umek
A control that displays multiple graphs simultaneously and automatically adds different scales
by Marco Bertschi
This tip presents an easy way of verbosely converting an exception and its inner exceptions to a string in order to get access to all details.
by G.TR
how to use NUnit to code tests
by Silvia Campo
Different options to create the maps
by massimiliano aronica
An HtmlHelper for an extended DropDownList, working with custom objects and displaying html options
by David A. Gray
The routines in this library can parse any string that I can throw at it, including Common Name strings read from X.509 Digital Certificates.
by OriginalGriff
I needed to show file sizes in a "human friendly format" recently, so I thought I'd knock up a simple method to do it. So the file sizes such as 10123456789 bytes would display as 10.1Gb and so forth.
by scott_liu
By use of a cutomized metadata provider, MVC model data annotation validation messages can be localized in a simple and elegant way.
by Bruce Greene
A class for reading values by section and key from a standard ".ini" initialization file.
by bluecurve01
How to parse robots.txt and robots meta tag
by MarcusCole6833
A basic Windows Forms Desktop Application to return a Julian Date
by MehdiNaseri
In this tip you will learn how to collect system information by using System.Environment and System.Management.
by Kaushik S Murthy
This application allows you to know the status of caps lock whenever the caps status is toggled
by Member 626383
Using grid and search grid using Ajax or without Ajax, and using Resource Files to enable multi language support
by LLLLGGGG
A really simple implementation of a C# menu for console applications
by lucafarias
A Simple C# Player Mp3 with NAudio
by Yvan Rodrigues
A demonstation of accumulators and operators
by George Swan
An easy way to read CSV files.
by Yvar Birx
How to sort your desktop, the easy way!
by Tarek Elqusi
I created a simple form with a button to add a label control at run time sequentially numbered; labels are movable and lines are drawn between labels.
by honey the codewitch
Scraping the web is easy with Visual FA. Here's an example of how.
by Armando de la Torre
Simple class that uses composition to encapsulate the ErrorProvider and make available the number of errors
by Paw Møller
Implementing a simple file system as a file.
by B. Verboven
Convert a generic list of (recursive) objects into a simple hierarchical TreeList
by B. Verboven
This is an alternative for "A simple generic TreeList".
by Anurag Saini
A tool to generate MD5 and SHA-1 checksums.
by charles henington
This is an alternative for "Send Mail With Attachment File"
by Erik Vullings
Generate a PowerPoint presentation, consisting of slides with a title and an image, without requiring Microsoft Office
by paladin_t
A simple plist parser within 100 lines of C# code.
by Howard 9448490
A WYSIWYG Printer Interface for Rich text
by folk007
How to change the background color of a DateTimerPicker control.
by a_pess
I think the code will not works on designmode, any how this the same code with a little modification but in VB. NetImports System.DrawingImports System.Windows.FormsImports System.Security.PermissionsImports System.Drawing.Drawing2DPublic Class RiverNilDateTimePicker ...
by mlzg4
This stream implementation is fast, thread-safe, easy to use, and very useful for debugging large distributed or concurrent projects.
by Nguyen.H.H.Dang
A very simple Thumbnail Viewer inherited from FlowLayoutPanel for beginners
by GoatMachine
A simple update method in C#
by OriginalGriff
Sometimes, you want to only run a single instance of an application - this makes it very simple to do. An Extension method that checks, switches and kills as necessary.
by Pasan Eeriyagama
This article focuses on a Very simple and Robust way to export Data to EXCEL
by Lewis Liu L
this tip is to use roles instead of individual user's access right to limit user's access on folders
by honey the codewitch
Creating an application that can run once, but then accept command line args from subsequent runs
by Marijan Nikic
A small command line utility for synchronization between two folders
by B. Clay Shannon
A C# snippet that converts Spanish text into a phonetic representation of how to pronounce it (in Mexican Spanish, not Spaniard Spanish) for speakers of American English
by Erion Pici
Generating automatized PDF reports based on Docx templates and Business-Logic XML-serialized data
by ahsanriaz1K
I will give a solution to the following problem "Response.TransmitFile(sFullHtmFilePath)" gives unformatted display of htm file on browser on client side.
by George Swan
An alternative solution to the Spiral Print problem
by CHill60
Simplify complex if-statements with "where value in list"
by PIEBALDconsult
An Extension Method that is similar to String.StartsWith, but uses a StringComparer
by Andreas Gieriet
This alternative is not substantially different, it simply splits the function into two:one for clippingone for comparingpublic static string ExtClipRight(this string a, int n){ return (n < 0 || a.Length <= n) ? a : a.Substring(0, n);}...public static bool...
by Yvan Rodrigues
A simple but effective way for format bound data in XAML with the Windows Runtime
by Abdul Quader Mamun
This article explains why a well organized pattern is required to develop a robust software application.
by Sitang Ruan
A tab user control with embedded client side object
by Sen Jacob
A simple task scheduler utility by which you can schedule a task to run at any time or interval
by Sen Jacob
This is an alternative for "A Task Scheduler Library for .NET Applications"
by Marc Clifton
Some code tweaks including the ability to alias a mapped property name
by Alessandro Lentini
This tip is connected to my previous one. I show how to use .NET 4.0 BlockingCollection in a simple way.
by Vijay Gill
Uses Unity for DI and NLog for logging
by Rajesh Buddaraju
A simple tool which is useful to calculate our day to day work hours
by Tomasz Malicki
Most data types have a built-in ToString method, but not all, and what's more, the default method can throw an error if, for example, the object is null.
by Erich Ledesma
A simple extension to map ditionary entries using lambda expressions
by B. Clay Shannon
In which the author takes the "That is an Exercise Left to the Reader" cop-out to Extremes
by Tony Zackin
A very simple yet customizable pop-up message box which auto-closes after a specified number of milliseconds.
by Vasily Tserekh
A simple straightforward car race game with minimum LOC.
by Erol Esen
This is a very simple example of data binding between two controls in WPF.
by Robert Vandenberg Huang
A general discussion of building the naming rule for your team
by nilotpalbarpujari
VS 2010 style toolbox written in C#
by Rahul Rajat Singh
A simple Windows Form like message box for ASP.NET applications
by Clifford Nelson
This tip presents a way to display checkboxes for selection of ListBox Items instead of the default highlighting
by Mario Vernari
Here is a simple trick for simulating the shared-sizing feature of the WPF Grid even in a StackPanel fashion.
by ugo.marchesini
An alternative way to use BackgroundWorker: more readable, more concise
by Vinayaka Krishna Shenoy
From past few days i was doing some R & D on the upcoming Entity framework from Microsoft, and i found it was interesting in many ways,The first part which i liked the most is -Querying to the Entity Data Model(EDM) rather than the real data store.At a high level , we have plenty of...
by Louwgi
HTML5 SSE example application
by Vipin_Arora
Abstract Factory Design pattern example in C#
by Steven Coco
This illustrates a simple pattern that provides a lock that can always be invoked; and may be a no-op for a non-synchronized implementation.
by Marc Clifton
Please don't do this!
by Pradeep Reddy S
Implementation of Accelerometer in WP8 applications.
by Prakash Lekhak
This article describes how to access master page control from content page.
by babu saravanan
This article explains how to retrieve TFS 2010 project check in details from C#.NET code
by pckola
Accessing userProxy, userProxyFull From AD Light Weight Directory Services
by Tantum
Access values of ProgressBar created at runtime
by honey the codewitch
If you're putting together templates or other messes using JSON and C# this may be the ticket for you.
by Abhijit Shiposkar
Accessing Active Directory Objects via C# (Visual Studio)
by Member 3568076
Hi,How to list all users in ListBox include cn, mobile, mail?private void Form1_Load(object sender, EventArgs e){ DirectoryEntry dir = new DirectoryEntry("LDAP://ou=o,DC=xyz,DC=de"); DirectorySearcher search = new DirectorySearcher(dir); search.Filter =...
by V R Shukla
How to access Active Director users on a WinNT network and show them in a dropdown list.
by Manas Bhardwaj
How to access the variables/properties from C# in JavaScript?
by Ramanujam Shankar
Show data in grid view control of Windows Stores App using web service or WCF
by Mostafa Asaduzzaman
How to access files within the application using DI
by Mahmudul Haque Azad
Accessing image from Resource File in XAML markup
by Abhishek Kumar Goswami
How to access MPP file using MPXJ Lib using C#
by Subodh Raikar
Accessing SSRS Reports from SharePoint Site using C#
by TweakBird
Accessing Value from System.Data.DataTable
by Andrew Rissing
Technically, the best approach here for speed and flexibility is to do the following:public class TestClass{ private const string EMP_ID = "EmpId"; public void MyTestMethod() { //GetData fetches data from the database using a SQL query DataTable dt =...
by A.J.Wegierski
int empId = dt.Columns[EMP_ID].Ordinal;...int empId = Convert.ToInt32(dRow[empId]);
by Ravi LVS
Datatable in ADO.NET is highly useful to do in memory data related operations. But it is very painful to update data when it is bound to a datagridview or bindingsource.While I was developing an application in .NET with C#, I came across this problem in which I had to modify a data table of...
by gunjan k saxena
This tip will help to create an action filter to compress the contents like Json, partial view, etc.
by Vladyslav Chernysh
The goal of this tip is to share knowledge and experience on ActiveX usage in .NET applications (back-end & front-end).
by Vipin_Arora
Adapter Design Pattern in C#
by honey the codewitch
Use TaskCompletionSource to turn an event or callback based model into a Task based one
by MarkLTX
Allow users to "magnify" your WPF application!
by Stefan Huy
Tag Listbox Object
by Brijesh Kr
Add and replace picture with preview functionality using the GridView control.
by Steffen Ploetz
How to realize text past functionality via inter process communication for your OpenTK based C# OpenGL application running on X11
by Steffen Ploetz
How to realize text copy functionality via inter process communication for your OpenTK based C# OpenGL application running on X11
by VijayaMalla
Adding a custom pushpin to maps using Bing Maps SDK.
by pramod.hegde
Create dynamic content controls at run-time.
by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Ever wondered how to add HTML file contents to the aspx page by code. Take a look at the implementation.
by Lance Ford
A walkthrough to enable request/response logging to an ASP.NET web application (or web service) by using an IIS module.
by echokilo
A simple tip to avoid the pain caused by PayPal providing code snippets for buttons each in its own form tag
by Monjurul Habib
How to add namespaces for Razor pages
by Frank Kerrigan
Adding double quotes to string variable is easy with StringBuilder in .NET.
by Brijesh Kr
Add populated dropdownlist to gridview programmatically which gives an option to select a new value too.
by Duncan Edwards Jones
Adding diagnostic tags to your functions for debugging
by B. Clay Shannon
How to use temporary MessageBox.Show()s in your C# app to quickly see data about exceptions
by MehdiNaseri
A simple application for adding users to active directory
by Mohammed Ibrahim.L
This tip shows you how to add the Values in Gridview using ENTER key...
by Vladan.Obradovic
Display additional properties for each VM inside SCVMM 2012 R2 console (VLAn, IP addres, VM Path, Mounted ISO, Number of Checkpoint)
by Douglas de Alvarenga Silva
Add-in Word for PrintScreen
by Sascha Manns
How to add the estimated time to read to a .NET Core Blog
by OriginalGriff
The Visual Studio Property pane is a control, which can be used in WinForms like any other, and it provides a simple, easy to use property editor for your classes. However, it is not obvious how to get it to open a browse dialog for a file path property.
by Ismael Almonte
Adding an http security header to web reference and using Oracle CRM stateless
by middelpat
Adding and subtracting with dates and times ignoring weekends
by Fiyaz Hasan
This article shows you how to add Angular Material in ASP.NET Core AngularSpa template
by Santosh Kokatnur
Adding Checkbox to a List View Column Header in C# WindowsForm application
by Purushotham Agaraharam
Setup file creation and adding a connection string custom control.
by Redslide
Modify MVC Routing to allow routes such as /Electronics/Software/Operating-Systems/PC/Windows-8-Installer
by Narsimlu Keshagouni
Adding fonts to Infragistics WebHtmlEditor
by Matthew Givens
Two ways to add functionality to .NET controls
by PIEBALDconsult
This is an alternative for "Adding Functionality To .NET Controls"
by Ankur Rawat
Adding Image in the Container without stretching/compressing the Image
by MarkLTX
Automatically implement INotifyPropertyChanged for every property in Entity Framework 6.0 entity classes
by jit_knit
Adding Map support in Dashboard for executive reports
by B. Clay Shannon
How to add the necessary code for additional Web API data points
by swapnil Mane
In this small tip we will discuss a way to add new tabs in the uCommerce admin view.
by Tharaka MTR
This tip describes how to add the dynamic style to ASP.NET page header
by Phil Boyd
Adding support for PasswordDigest to WCF Service References
by Shesh Lamichhane
Step by step to add the transformation files of app.config in your .NET Windows service
by B. Clay Shannon
Easily add Version Information to the main form Title bar of your Winforms app
by E.F. Nijboer
ExcelDataReaderHelper: Functionality similar to LinqToExcel using the ExcelDataReader package
by #realJSOP
Evaluating epressions in an ad-hoc condition.
by Andrew Rissing
This is an alternative for "Ad-Hoc Expression Evaluation"
by #realJSOP
What to do when the "you're a moron" epiphany smacks you in the head just after you've convinced yourself you're pretty clever.
by Ankit Bansal MVP
This articles explains the insertion of data into SQL Database using Stored Procedures with Output Parameters. Some Bootstrapping is also used to create a good looking HTML.
by Vinay Jade
ImageButton control can be used as AdRotator with help of UpdatePanel
by Mr.PoorEnglish
This is an alternative for "C# Sprintf-Lite"
by Peter Sun (247)
Demonstrate how to create WPF TrewView with multiple levels of HierarchicalDataTemplate from C# code-behind without XAML using MVVM for data binding
by BradodarB
Simple example outlining how to optionally employ AHAH based views in an MVC application.
by Saurabh Singh _
A simple approach to handle Airspace problem
by Christopher John Paul
Ajax Asynchronous Postback Method
by Vinay Jade
Using Seadragon, you can simply zoom-in and zoom-out an image
by Yogesh Jamkhindikar
Solution if Ajax method not calling Controller method every time its invoked
by Albin Abel
Though update panel keeps the page responsive while paritially post back, it will not avoid a round trip of complete page and control events. So care needs for a better performance
by Shah Ankita
This code sample demonstrates how to set an alarm notification.
by Wayne Gaylard
All purpose Boolean to Visibility Converter
by rhuiden
I would first like to say that I have been through the same situation, but never took the time to develop a more dynamic converter. I like your idea, but don't like the implementation. If I know what I want to happen (when the value is true then make the control hidden), I have to do some mental...
by CHill60
Allowing a User to cancel a Form when Validation is in place and invalid data has been entered.
by Rudy du Plooy
This code creates a mutex before starting an application and releases the mutex when the application is closed. A user will only be able to start the application once. This can be used for services as well./// /// The main entry point for the application.///...
by DaveyM69
Now your application can update it's saved data regrdless of the account it is running under.
by Hesham Meneisi
This is a quick way to allow or disallow a program through the firewall.
by SoftwareMonkeys
Circular references aren't allowed between assemblies, but there is a way to do something just as good, or even better.
by OriginalGriff
It's pretty easy to let Windows Explorer drop files on a WinForms app, but I can never remember how. So since I needed a "file touch" app, I thought I'd document the process here.
by Joezer BH
Avoiding a cumbersome message box or input box that locks the application in WPF.
by HiDensity
Class providing methods to count up a string using a definable character set.
by nickdenker
An ORM style layer which turns Azure Table Storage into a cheap and scalable indexed noSQL database - without the costs associated with Azure CosmosDB.
by reachme_saurabh
by Abhishek Sur
Thread.Sleep is actually used to block the thread Temporarily for an interval. Async CTP brings forth one probable alternative if you dont want to write yourself : TaskEx.Delay(milliseconds)Probably in next release it will be Task.Delay(milliseconds)This works little different as it...
by AspDotNetDev
In this alternate version, we take into account the possibility that binding to a list of different types may cause compile errors.
by RelicV
Alternative for AutoComplete control without Ajax and Webservices
by U_IO
Consider possibility of alternative syntax usage to refer and access to last anonymous objective variables in C# instead of using construction in code.
by Dean Oliver
An alternative to Activator.CreateInstance
by Andrew Rissing
Using expressions, you can achieve a faster result with less code.public static T New(){ Type t = typeof(T); Func method = Expression.Lambda>(Expression.Block(t, new Expression[] { Expression.New(t) })).Compile(); return method();}Furthermore, this can...
by Dean Oliver
The final solution after much debate and optimization:public class DynamicInitializer { static readonly Dictionary> list = new Dictionary>(); public static T New() where T : class { return New(typeof...
by Jonathan Jandrell
I've tried a few different ways to dynamically create an object of 'unknown' type.This is my final, simple result: public static T Create() { Type type = typeof(T); return (T)type.Assembly.CreateInstance(type.FullName); ...
by Yves Vaillancourt
And why don't you just do this?public static T Create() where T : class, new(){ return new T();}
by Andreas Gieriet
XML Serialize versus hand crafted CoDec (as alternative to "Advance String Split and Joiner")
by beatles1692
Some time ago, we noticed that in one of our projects the size of memory of our application is growing and it never decreased.After some checking and testing we realized that even if we have a local reference to a form, if we haven't  disposed it explicitly it will remain on the stack and never
by bconlon
Ambiguous classes in C#
by Thomas Roll
A .NET equivalent of Java's AdjustableSemaphore
by Reto Ravasio
Howto Paste and not make a mess
by George Swan
A .NET7 version of a Rotated Binary Search method
by fs7744
Easier to use MemoryCache with AOP example
by George MVC Study
This tip shows an example of ASP.NET MVC cascading dropdown list.
by dontumindit
An Easy Way To Query a Database
by Andrew Rissing
The following samples should take advantage of using statements and furthermore built in features of the ADO.NET framework. Furthermore, if you open a connection, make sure you open it at the latest time possible and close it as soon as possible.Edit: While I was originally not trying to...
by FZelle
You are both wrong with the DataAdapter.Why do you think there is an overload with the querystring and the connectionstring?public DataSet select_query(string query, string con_str){ try { using (SqlDataAdapter da = new SqlDataAdapter(query,con_str)) { ...
by woric
The sample code provided by Andrew Rissing is a huge improvement over the original, but incorrectly catches the exception and displays a MessageBox. (Andrew correctly points out this is not a good idea.)A better solution is to allow the exception to fail:public DataSet...
by PrimeCoder
Nice,How about adding a couple of other methodspublic static void Parameter(IDbCommand command, string naam, object value){ IDbDataParameter par = command.CreateParameter(); par.ParameterName = naam; par.Value = value ?? DBNull.Value; ...
by Liu Junfeng
A simple and powerful command line options parser.
by brain2cpu
The way x:Bind is (not) working in universal Windows applications
by Gianmaria Gregori
How to add a random sliding effect to the Bakery home page
by Armando de la Torre
Use an error log control to validate forms.
by Basem AlShabani
How to solve recurring problems using LINQ
by Pavel Yermalovich
An example of Prototype pattern
by dreamzlife
A simple way to parse multiple CodeMetrics XML data and generate a summary report.
by Sitang Ruan
An expandable .NET GridView control
by Marc Clifton
Alternatives to If-Then-Else with Extension Methods and Functional Programming Techniques
by TheGreatAndPowerfulOz
Gets the digits and the sign of an integer in an array
by Code Artist
DataGridViewEx is an extension class created to extend WinForms DataGridView control with advance editing features.
by honey the codewitch
Add progress reporting to your downloading or copying using this code
by massimiliano aronica
Speed up the loading of the main view by automatically loading partial views in async
by Ankurkumarbora
This tip contains a solution for rendering reports which can be viewed (or saved) with different extensions.
by Yuriy Magurdumov
Simple generic data structure to maintain hierarchical objects
by Paulo Zemek
The ?? operator is odd when combined with exceptions - It helps assignments but not non-assignments. Why?
by Farzan Hajian
Analyzing HTML documents using NSoup and ExCSS libraries
by Mukund Thakker
Android GCM Push Notification
by Houssem_Dellai
Develop Android applications using Visual Studio and C#
by Tefik Becirovic
Calculate angle between two points and the x-axis using C#
by Callum Linington (UK)
My way of diminishing the need to write out all those angular script files
by RajKGoel
This tip is targeted towards learning the basics of Angular JS, using it with ASP.NET Web API.
by Federico Alterio
Description of a library that allows to use a porting of Angular Signals in .NET MVVM Frameworks
by Bert O Neill
AngularJS and Web API Active Directory Security (Authorisation)
by anujk0292
Create AngularJS 1.x web application using Microsoft Typescript
by Thinira
In this tip, we will discuss how to setup Angular 2.0 in Visual Studio and write a very basic “Todo” application.
by Tony Jen
An anatomy of an AngularJS project I created. We will discuss parts of the application from HTML elements, to back end controllers and services.
by Yaseer Mumtaz
AngularJS ng-grid export to CSV workaround for Internet Explorer to avoid showing "Save" dialog box.
by Bert O Neill
AngularJS RibbonBar written with HTML & CSS (and a little JQuery)
by Tony Jen
Custom validation in AngularJS using custom directives
by anilkumar.6714
This is an animated label in C#.
by Malak Zia Nasir
Override the Windows Store app default splash screen with an animated one
by Anis Derbel
The easiest way to animate your object using Storyboard
by Bhanu Pratap Singh Rathore
Animate Controls with ease using the MAnimation class developed by myself and can be used by anyone.
by Abhishek Geek
Anonymous methods and lambda features in C#
by Pranay Rana
Anonymous types
by Member 3471983
Add Filter Sort and Theme to a datagridview
by Yossi Yaari
A basic yet generic state machine implementation
by Xnko
On the Web there are many examples for moving ViewState to the bottom of Page using RegularExpressions. This is another way using HtmlTextWriter.All you nees that add in your project class named MoveViewStateHtmlTextWriter and write in your BasePage code below.protected override...
by Mike Thom
If you move your ViewState from the top of the page to the bottom, you will get better search engine spidering.Step 1Create a class file in App_code folder of your application and name it as PageBase.cs. Copy the following code to the class file.using System.IO;using...
by Malte Klena
Build a StreamReader that can differentiate between ANSI and UTF8 regardless of a byte order mark
by cyprussun
AnswerBox is just another replacement for the inflexible MessageBox.
by Tyrone Roson
Fun with Interchangeable UI Controls
by Sourav Kayal
Application and Session state in ASP.NET Core
by _Amy
Validating the client using Lightweight Directory Access Protocol (LDAP)
by Vasudevan Deepak Kumar
This is a simple class/demo application that shows how to check whether the account that is being used to run the application has administrative rights.
by Member 3783976
The key to restart application properly is where you should code "Application.Restart();" in
by Abhishek Banerjee (A Web Developer)
Hello All,Today I am showing an interesting block of code which will help you in applying user search on a tree view control of asp.net applications.PrerequisitesFor this you have to create an asp.net demo project using language C#Action:Step 1: Now Create a web page with name...
by B. Clay Shannon
How to apply Attribute Routing to Web API Controllers
by Ponkarthikeyan Thangavel
This tip describes about applying reusable read-only styles for WPF controls at Application/User Control level
by Bartlomiej Filipek
How to apply the strategy pattern to a problem while designing a class hierarchy. What are the pros and cons of this approach?
by Steffen Ploetz
How to implement modal windows with OpenTK on Linux, that behave like dialog boxes on Windows
by Steffen Ploetz
How to provide modal UI application components without leaving the UI thread or pause/block it
by DotNetSteve
Manage an overgrown appSettings section
by shouvith hydrose Kerala
This article explains how to change Arabic Calendar Date to English Calendar Date in Windows Form C#.
by Farhan Ghumra
Learn how to create zip archive and extract it without any 3rd party library
by Steffen Ploetz
Compare the speed of generic collections running on .NET Framework 4.6.1, .NET Core 2.1 and Mono/.NET 4.5 based on the framework's version of List against Loys's version of AList.
by Alaa Ben Fatma
Generate your arrays using a GUI tool
by Rahul.KumarSharma
Difference and simple implementation of as, is, and Reflection.
by Peter Leow
Get your database to generate unique running IDs for your application
by Ahmad F Hassan
An easy way to view hierarchical data in a simple ASP .NET Repeater
by AlexCode
Adding support for IHttpHandler on ASP.NET Routing
by AlexCode
Hi guys, I have a new version of this.Although it works as expected for the majority of cases, I found a problem on the previous version of this code, that is, it reuses the HttpHandler for different requests and that can be a problem on more complex implementations where inner properties are...
by Jani Giannoudis
Adapt properties like visibility or enabling between ASP.NET Controls.
by Anurag Prajesh
How to add banner and slideshow in your website with adrotator
by Ameet Parse
ASP.Net Ajax AutoCompleteExtender without using Web Service
by tahir irshad abbasi
by ChienVH
In this article will show you how to work with ASP.Net and Paypal with Dynamic Ordering Values
by Sajid Qayyum
Describes authentication management using cookies
by Tarek Najem
A new Blazor component to facilitate the use of the FontAwesome framework in Blazor
by Armando de la Torre
How to implement a calendar pop-up without JavaScript
by mike2315
Using jQuery, we have a very simple solution for this.Add jQuery and CSS in the head tage and these two lines of JavaScript:<script...
by JoaoSousa23
This article will show how to integrate Microsoft Azure Application .Insights into a web application using ASP.NET Core 1.0 to Detect, triage, and diagnose issues in your web application
by Fiyaz Hasan
This article shows you how to enable API versioning for ASP.NET Core Web API following three different techniques.
by TheForceIsSharp
ASP.NET Core Web API, Multiple Get or Post methods with single controller
by xszaboj
How to setup net core with automapper
by DiponRoy
Using SFTP/FTP in ASP.NET CORE projects
by S V Saichandra
Asp.Net Custom Validator Control to validate file size both client side validation and server side validation
by Ruhollah Heidarpour
Just another ASP.NET Persian(Jalali/Shamsi/Solar) / Gregorian Datepicker
by Atlapure Ambrish
Solution to disable request validation for single control - clean approach and without much effort
by Karthik_Mahalingam
Show/hide the loading GIF image while exporting a file from server
by virang_21
This tip discribes how to implement filtering from inside ASP.NET gridview header row
by virang_21
This article describes how to implement row drag and drop inside ASP.NET Gridview using Jquery TableDnD plugin and how to pass reordered sequence back to server
by Neohuman Software
How to: Using ASP.NET Identity using Azure Storage Tables
by Tejas Vaishnav
ASP.NET menu control not shown properly in Chrome and Safari
by Rajesh Jinaga
Change default action at individual controller level in ASP.NET MVC.
by Karthik. A
Debugging ASP.NET MVC routes simplified using "Route Debug"
by JoaoSousa23
ASP.NET MVC 5 – Entity Framework 6, CRUD Operations on Visual Studio 2015
by Mikhail Vasilchenko
ASP.NET MVC 5 Multiple Image Uploader with Crop
by Luis Manuel Prospero Mano Batista
ASP.NET MVC 5 SignalR, SqlDependency and EntityFramework 6
by Hovhannes Bantikyan
This is a simple infinite scroll with Ajax post and JSON. Have fun :)
by Hugo Dominguez
This article shows you how to expose the AngularJS controllers in order that they can work harmoniously with MVC controllers, and they can be loaded dynamically only when they are requested.
by Ahmed Bakodah
This post is about how to demonstrate CheckBoxList in ASP.NET MVC 4
by towaso
A short example on how to create a hierarchical web checklist
by Sreenivas Chinni
This is a tip to add custom data annotation with client validation in ASP.NET MVC 5
by Oetawan
Extend ASP.NET MVC behavior to auto wire controller dependency
by Rohit Kukreti
Learn how to route variable URL patterns to fixed Controller/Action
by JoaoSousa23
An easy way to perform fire-and-forget, delayed and recurring tasks inside ASP.NET applications
by jackie verma
This article will help you to understand and create partial view in short and easy way.
by Riverama
Improve ASP.NET MVC based SPA application performance by using script Bundles with requireJS
by Parvathaneni Mamatha
How to use Razor Views as Email Templates and Localize them using sample WebAPI
by Roberto Ferraris
How to use templates in ASP.NET MVC to edit enum fields
by BalaG Ganesan
ASP.NET MVC4 - Bundling and Minification
by Siddharth R Barman
Implementing a custom UserStore for ASP.NET MVC5 authentication
by Vinayaka Krishna Shenoy
Page Transfer best practices in ASP.NET.Scenario :Inside Try/Catch block, If you want to transfer/Redirect the page to another page - To avoid ThreadAbortException Option 1Use Response.Redirect("Pagetotransfer.aspx",false);OrOption...
by Niaz Morshed
I do not claim that this piece of writing is going to be something new but a very short combined set that can get someone going with ASP.net in no time.
by tsdragon
Application[“P...
by BenScharbach
Trick of using @Helpers in @Helpers in ASP.NET Razor
by wb2you
Generic approach to adding summary totals to an ASP.NET Repeater control.
by Christopher John Paul
Prevent users from entering comma
by brunofer2007
Easy way to sort nodes in a TreeView using a recursive function.
by nasir_ml
ASP.NET textbox validation made easy.
by aamir sajjad
How to implement the custom authorization and exception handling attribute in the ASP.NET Web API.
by karlodegrano
A generic HttpContent Reader that can be used to replace FromBody parameter on Http Action
by James Walsh Jr
The differences between parameter and model binding with ASP.NET WebAPI
by Alexander Kozlovskiy
Used for binding custom types (including files) when sending and receiving multipart encoded form data
by Vincent Maverick Durano
This tip demonstrates how to upload an image to a specified folder within the root of the web application and display the image right away in the Image control after uploading.
by User 10259217
Handy bridge between ASP.NET webservices and Java
by ChienVH
This article will guide you how to implement ASP.NET website with multi-language
by kadaoui el mehdi
In this trick I present how to prevent an attack by a hacker on Asp.net website.
by DiponRoy
Using SFTP/FTP in ASP.NET projects
by Olga Tabulov
DropDownList requires the binding object to have a property
by congiuluc
How to check Email address during user registration with ASP.NET MVC 5
by Alexnader Selishchev
Nocode open source CI+CD for ASP.NET apps
by Christophe Bertrand
A parser for AssemblyQualifiedName for .NET
by Akhil Mittal
Helper class to compare two class objects while unit testing
by Marc Clifton
Instantiate the exception that you want in an assertion
by Francesco Bagnasco
Just a quick sample to clarify what we can do and what we can't
by Pathak Ashwin
Asynchronous Web Service Call
by Arkadiusz Kaɫkus
Property is a simple idea, but like many others can be misused. This tip describes asymmetric property anti-pattern and shows why properties should be symmetric to be maintainable and intuitive.
by Sharath C V
A simple async / await example
by Gaurav Goel (Team Lead)
This tip teaches you the basic use of async and await, how threads work internally
by Tristan9
Better use async / await in web applications
by George Nistor
Async file copy with read/ write threads.
by Super Lloyd
Show how to make OData code async friendly
by ashish__shukla
Asynchronous ActionMethods in MVC can improve application performance
by Kumar_Jitendra
The asynchronous controller enables you to write asynchronous action methods.
by Nitipan
This is my helper class: public class AsynchronousMethodHelper { private static Delegate _method; private static Delegate _callBack; public static void AsynchronousExecution(Delegate method, Delegate callBack) { _method = method; ...
by Himanshu Manjarawala
How to report progress and intermediate results from an asynchronous process to client code.
by John Pravin
Asynchronous Programming with Task Parallel Library.
by Assil
A light article about a new feature in C# 5 and .NET 4.5
by Sourav Kayal
Asynchronous programming in Web API /ASP.NET MVC
by Amir Dashti
A simple but powerful class to simplify executing T-SQL commands asynchronously
by Pranay Rana
Attach JavaScript with auto-generated buttons of the GridView control.
by DaveyM69
How to have a real console window as well as your forms
by johannesnestler
Very good tip. I just want to mention an alternative - you can just change your project output type to a console application. (You can undo it later if only needed for debugging). So if you started with a Windows Forms project in Visual Studio: Go to project properties/application/ and in the...
by fastal
VB version:Friend Declare Function AllocConsole Lib "kernel32.dll" () As BooleanFriend Declare Function FreeConsole Lib "kernel32.dll" () As BooleanSub main() Dim MainForm As New frmMain If Command = "" Then MsgBox1 = AddressOf MyMsgBox1 ' messagebox delegate sub call...
by Andreas Gieriet
To not having spoiled the client code with #if DEBUG, you might use the following:[STAThread]static void Main(){ Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { Debugging.DebugSetupConsole(); ...
by Shripad J
ASP.NET website project hosted on IIS 7.5 running on Windows 2008 R2 is unable to connect to ‘Oracle’ database.
by Marvin Bland
The other option to review when you receive this error is to view your Application_Pools setting for the app_pool you are using for your application.Check the "Enable 32-Bit Applications". If this is "False", change it to "True". This may resolve your issue.
by arpanmukherjee1
RelayCommand.CanExecute in MVVM with attributes not WPF Requery
by ahmet_uzun
Audio pitch shifter application using the CSCore library
by mneu79
Generating automatic audit information with Castle ActiveRecord.
by Mathi Mani
Authenticate WebAPIs with Basic and Windows authentication
by Dennis Baberich
How to get a claimbased cookie authentication between custom frontend and self hosted SignalR server
by Bikash Prakash Dash
How to create an auto suggestion control like Gmail/Hotmail/Facebook to add items in list.
by Sreenivas Chinni
This is an article / tip that I am trying to giving an idea of creating a general auto complete helper for asp.net MVC 5 developers
by Sivaraman Dhamodharan
Auto Fill the content of text box for well known entries
by deepaktripathi
Using auto complete textbox in jQuery Tabs content via AJAX in an Microsoft MVC project.
by Yogesh Kumar Tyagi
This tip introduces Auto Complete Text in Textbox Using jQuery and ASP.NET MVC.
by Jeff East
Implements automatic column width sizing based on item contents for ListViews using GridView
by rohitsies
This article describes an advanced technique and configuration to automatically transform and run your all or selected T4 templates when a project is build.
by Vitaly Tomilov
Simplest and quickest way to automatically bind array of image bytes to asp:Image object.
by Yvan Rodrigues
This handy tip is an easy workaround for a shortcoming in iOS 6 and 7.
by saurabhsharmacs
Migration to AutoMapper 4.2.1
by Adam Flow
A short look into the possibilities of AutoMapper's operation options
by Maazaoui Mohamed Amine
Creating a Windows service to monitor Splunk licence usage using splunk SDK
by Jo_vb.net
Get started MonoGame and use IceSkater C# project
by Imre S Lengyel
Use ILSpy to perform a more comprehensive check on Emitted assembiles
by Yogesh M Joshi
Following project enables users to get Tag suggestions for the uploaded Documents in SharePoint 2010 libraries. Also it helps in bulk tagging in case of migration of large content
by Srinivas Kalabarigi
How to do automatic page refresh in ASP.NET
by Anand Gunasekaran
Scanner automatically scans multiple pages using BackgroundWorker Thread
by Pavel Torgashov
Simple and fast skew correction of scan docs in C#
by Emiliano El Mariachi
Here is a small library to help you have an automatic undo/redo feature without explicit dependency on Undo/Redo system.
by phome
CAAV, Increase/Decrease the version segments in AssmblyInfo.cs or template files in the specified folder and its sub-folder
by Bloody Chicken
How to automatically create a dump file when the program hangs
by #realJSOP
How to automatically display a Winforms menu when the mouse is hovered over an item
by Chip VonBurg
Automatically display your application version in the UI
by tc99
Immediate access to resources without clicking
by Deepak_Sharma_
This article will show how to create an auto-suggest TextBox that will suggest data from a SQL Server database column.
by Anuja Pawar Indore
I first tried using Ajax autocomplete, but found jQuery as an alternate
by Chandramouleswaran
Quick hack for spell check with AvalonEdit.
by Amin Esmaeily
In this tip, I will explain how to create a simple user control (AverageMeter) using WPF.
by Bruce S Oberhand
Consider the Decorator Pattern!
by ambatisreedhar
Export to Excel,default formatting of excel,excel number format,excel date format,excel currency format
by MRBULL93
In this tip, I am presenting a simple way to avoid refresh resubmit
by r verma
Following trick will also provide a way how to handle/pass objects to web service through a web application as in web applications developer will not be able to update proxy class (old trick followed in case of class library). When you try to serialize your class let say using Binary...
by BillWoodruff
Suggestions for adding controls in code
by Jason Curl
Using System.IO.Stream default implementation of BeginRead() and BeginWrite() may result in unexpected deadlocks.
by Igor Pashchuk, MBA
This is an alternative for "C# Pivot Table"
by James IV
Prevent a checkedListBox from toggling check state when clicking whitespace
by Federico Alterio
Elegant replacement for awaiting a limited set of tasks
by Mukesh Pr@sad
This tip describes how to build an application in Azure Cloud with ASP.NET MVC and WCF.
by IInjac
Azure Mobile Services Managed Backend–fortumo Mobile Payment Integration
by ankit57100
Azure Notificationhub - Sending Push notification to mobile devices
by Gil Fink
Back to Basics – Null-Coalescing Operator
by Gil Fink
How to read a file into Memory Stream
by Paulo Zemek
Using a BackgroundLoader instead of Lazy to make your application more responsive.
by Chandra Shekhar Joshi
How to implement the Queue of Background Worker
by DaveyM69
A simple demonstration of how to use a BackgroundWorker with a ProgressBar
by Clifford Nelson
You can implement BackgroundWorker using Lambdas without any sort of helper class very easily.
by Shweta Lodha
Behavior of BackgroundWorker thread for Console and Windows form apps.
by FantasticFiasco
A tool helping you to backup all your TeamCity projects and their settings.
by OriginalGriff
One of the things that it seems far to hard to find is a reliable way of backing up a database, and restoring it again later. Particularly for development, where the SQL server instance and the database are likely to be on your development machine, and very likely to be damaged by code.
by adriancs
A tool to backup & restore all MySQL databases in one click
by Saddoud Anis
Allow your applications the ability to backup and restore your PostgreSQL databases.
by ROHIT SHAW
It shows how to display a badge notification in Windows 8 metro app
by Paul Schwartzberg
This tip shows two possible methods to find the balanced index of an array in C#.
by AMB-03
This is a very simple way to create a balloon message... without using any plugin
by Espen Harlinn
A fragment showing how easy it is to read barcodes from serially attached Symbol barcode scanners
by mhano
Base32, base32url, base64url, and z-base-32 Encoding and Decoding in .NET
by DaveyM69
A few quick examples of how to correctly create events.
by Nomesh G
Setting up basic MVVM in WPF and ICommand usage to allow operations on ViewModel from view.
by Jdarmanovich
Basic MVVM pattern for binding items to a listbox in WPF
by leopard447
String handling Extension Methods
by George Swan
As it stands, the TryParse method will fail if the string contains commas. E.g., 10,000. To get around this, you can use:bool isnumber=int.TryParse(text,System.Globalization.NumberStyles.Integer | System.Globalization.NumberStyles.AllowThousands, ...
by Amit M patel
How to code for Delegate In this artical explains basic understanding for delegate and how to create nad use delegate. This code for .net framework for C# This artical is usefull...
by javieranton
A basic WCF call + callback example in C# using WSDualHttpBinding.
by Southmountain
One time-saving tip on debugging App.config file
by Southmountain
one caveat you may miss when you use Settings.settings file
by Alaa Ben Fatma
Small tool to write, run batch codes
by Bohdan Stupak
Batching is a nice technique that allows you to handle big amounts of data gracefully. Directory.EnumerateFiles is the API that allows you to organize batch processing for the directory with a large number of files.
by pasztorpisti
Avoid accidental virtual method calls in C++ constructors/destructors, Java constructors and be careful with them in C#!
by honey the codewitch
A B-tree, an AVL tree, and a Splay tree in C#
by Rahul Krishnan R
Simple article to load a crystal report rpt file using crystalreportviewer in Visual Studio 2012
by syncsivakumar
Behaviors and Triggers explained with samples.
by comiscience
Behaviors complete MVVM
by Tim-bot
Simple calculation to determin a value at a percentage along a bell curve. Also with an offcenter curve intersection thing....
by Narsimlu Keshagouni
Best fitting the text fields while adding text to the PDF files to save page space.
by Vinayaka Krishna Shenoy
Introduction...
by Kundan Singh Chouhan
Simplest, best and most robust architecture.
by arturomonriv
This short article just shows the evolution of my implementation of the Factory pattern in C#.
by tmenier
An introduction to Flurl, an open-source .NET library for fluently building URLs
by yash soman
The tip is about using Elvis operator which is introduced in C# 6.0 for Null Reference Checks. It gives an example of how to use it.
by PracticalDeveloper
A panel that has rounded borders, gradients, edges/bevels and a shadow
by RickZeeland
This is an alternative for "Beveled Panel with Shadow Effect"
by Greg Osborne
You don't always get what you expect with floating point math.
by CoperNick
How suprising can be conversion of decimals to bytes in C#
by Yvan Rodrigues
Maybe writing a tip will mean the last time I fall for this.
by Zebedee Mason
Or why not both? This shows how.
by Bhushan Mulmule
This is terribly unorganized document with mix of MVC, Entity Framework, LINQ, HTML 5 and JQuery how tos...
by Bim Garcia
Implementation of ISO8583 in .NET
by be05x5
Posting this solution because I found all other options out there except this one. In this particular case, I have 1 item that can be packed a # of times and the goal is to pack it in the most efficient manner not to exceed UPS/FedEX LxWxH limitations, not providing box dimensions to fit the item in
by hirosht
Step by step method of thresholding a image using the EmguCV API in C#
by Arnaldo P. Castaño
The idea with binary exponentiation is to use the binary representation of the exponent to reduce in log2 the number of iterations required to produce a result.
by roberto bandiera
This work aims to show how to do binary serialization and deserialization of an array of objects in C# with .NET 7.
by honey the codewitch
BinaryReader and BinaryWriter can be used to parse or write binary files more easily and in a portable manner
by TarikHuber
Use STT (SQL Table Toolkit) to bind WinForm Controls to a DataGridview and to define ComboBox data sources
by saurav ray
Article determines how to bind a crystal report with a virtual database
by AditSheth
Bind distinct list to Dropdown List from DataTable
by Amol Jadhao
How to bind dropdownlist in ASP.NET using JQuery Ajax
by #realJSOP
Can't you just call Enum.GetNames(), and then bind to the collection returned by that method?
by Xmen Real
here is what I do to iterate through enumpublic static ABC(Type enumType){ foreach (Enum e in Enum.GetValues(enumType)) { int tvalue = Convert.ToInt32(e); string tname = e.ToString(); }}
by Nirav Prabtani
Bind gridview using Ajax post method and jQuery
by Arkadeep De
Bind an image slider without database in ASP.NET
by Vertical AIT
Automatically bind MVC HTML RenderPartial and Partial view pages to your model's child objects without having to use HTMLFieldPrefix.
by adriancs
Convert DataTable to Class Object
by Clifford Nelson
This article presents a way to display a message in a single control with several sources in a priority order
by manchanx
Tidy, generic solution to bind Enums (with or without a DescriptionAttribute) to a ComboBox or other Controls
by Masoud Ehteshami (Iran)
main source : https://www.jqwidgets.com
by SanSkun
How to bind holiday list and information about those holidays from database
by Volodymyr Trubachov
Describes the approach to bind a group of radio buttons to a single property, regardless of the property type (enum, bool, int, string).
by Kubajzz
How to turn a static property of any type into a StaticResource
by Amit_Mittal
An easy way to bind XAML with properties defined in code behind
by jindrich.babica
Binding with respect to CurrentCulture
by Clifford Nelson
Fairly straight forward way of binding in a HierarchicalDataTemplate or DataTemplate to the parent ViewModel when using the TreeView control.
by Houssem_Dellai
Using Bing Maps in Windows Phone 7
by Fredrik Zetterlund
BitmapImageExtension with NetworkCredentials.
by mohamad12345
IntroductionI have wrote this post to tell you how to retrieve all BizTalk 2009 Applications with some important information. I am using BizTalk ExplorerOM assembly it is allow me to access BizTalk Application objects, so I have created simple windows application that show all BizTalk applicatio
by prachi_pandey
Map fields from multiple schemas to fields of a single output schema
by Mohit_Patel
Blank folder remover from selected path using recursion.
by Ladware.Net
Blazor and Windows Form desktop application
by aditya pewekar
Custom component to handle checkbox after confirmation modal popup
by aditya pewekar
Custom JQuery datepicker component using Blazor
by Scott Ward
Using extension methods to make working with JavaScript in .NET Blazor easier to work with
by Đỗ Hồng Ngọc
Using IKVM is not "so simple" as you said. There are some implementations of Blowfish in C#. You can refer to:http://www.koders.com/csharp/fidD5E0D7AC50858EA8F7131E8CD2746F3471A1B953.aspx[^]http://www.schneier.com/code/blowfish.cs[^]and,http://www.bouncycastle.org/csharp/[^]
by arun_1920
Check this link: http://www.schneier.com/code/blowfish.cs[^].
by Ravinder Singh Yadav
Blowfish encryption is very popular for encrypting data but its really hard to find a simple .net implementation of this algorithm. This articles tries to solve this problem.
by Arkadeep De
Bluetooth Desktop Locker with Android Application
by RumataEstorish
Simple code for applying and disabling blur effect on any UIElement
by RobLazarus
This books is a tour de force and a must-have for any ASP.NET MVC developer as it will save you hours of time and frustration researching solutions to the various questions you may encounter when using MVC 4.
by Francisco T. Chavez
Bool to content converter
by Oleksandr Kulchytskyi
This tip explains how to increase performance in serialization by using MessagePack
by DiponRoy
Bootstrap datepicker and Knockout Model Binding
by Lyubomir Rumenov Velchev
Display Bootstrap Modal Dialog using Version Bootstrap v3.2.0 and v3.0.0 - issue
by Shashi_Singh
How to use option's in bootstrap modal plugin.
by Muhammad Hassan Tariq
Bootstrap 3.0 Sticky Alerts using Angular JS service
by Yves Vaillancourt
Bound model properties to a DevExpress GridView
by BobJanova
How to wrap a value type so it can be used in positions where a reference type is required
by supercat9
Mutable structures and classes behave differently when it comes to Generics. Although such differences cause some people to deride mutable structs as evil, they simply offer different semantics from class types. Such semantics are for many purposes superior to those of class types, but some code...
by Atish Dipongkor
Customize default login page with own branding for Form Based Authentication
by _Noctis_
This will allow you to integrate your linqpad code easily to Visual Studio
by Thrivikram Hathwar
How to broadcast data using .NET TPL dataflow
by Anis Derbel
This tip will show the new way to browse photos with Windows Phone 8.1
by Olivier Levrey
Simple helper classes to read/write files using BufferedStream plus a few handy methods (read/write structs or simple arrays)
by Ragheed Al-Tayeb
Hi Olivier,First, thank you for your helpful post here and I'd like introduce some suggestion that might help to increase the performance of the Read & Write methods (of arrays such as ReadIntArray, ReadFloatArray and WriteIntArray, .... etc.). My suggestion is to make use of the...
by Matthias Böhnke
Bug Fixes for Reading Barcodes from an Image - III
by yafeya
Build a username authentication WCF self-host application with SSL
by Ramesh Bevara
An overview of a helper class to build dynamic order by clause in LINQ query in C#
by dimpant
How to use Bridge.NET to convert your C# code into a JavaScript application featuring Bootstrap and jQuery.
by Shivprasad koirala
I had a very vague idea, but I wanted to be sure about the exact differences between them.
by Rachana BG
How to build treeview structure for SharePoint List data
by Fitim Skenderi
Build where clause dynamically in Linq
by Southmountain
This tip shows how to build your own project file from scratch using MSBuild. It will deepen your understanding of project file made by Visual Studio IDE.
by Harsh Deep Gupta
No need to build and publish packages manually, automate it using GitHub Action
by Peter Sun (247)
Create a C# WPF app to read Twitter tweets and retweets via REST API with grouping related users / friends by categories. As a bonus, tweets can be saved in Azure / Cloud, and viewed in an Azure website.
by O.Nasri
This tip shows you how you can implement a contact form in C#/ASP.NET MVC
by ferdrodrigues
Implementation of a folder tree in front-end and back-end
by Masoud Darvishian
In this simple tutorial, we want to create a scrolling sprite-based star field background using Xamarin Studio and MonoGame.
by Seth Juarez
How to build a simple contact application with XAF
by Abhilash Raja
Building adaptive layout in a windows 10 app with relative panel and adaptive triggers
by Jitendra Ballia
Building data access layer using enterprise library
by hlonihloksDJ
Building DynamicTVP
by Kishor Deshpande
Reduces line of code by writing builder methods to construct integration test queries.
by DiponRoy
Let's make a lambda expression from a property name of a particular entity, and use it for OrderBy shorting
by dsuryd
Simple, lightweight, yet powerful way to build real-time React + C# .NET web apps with dotNetify-React.
by Lucas Vogel
Get YAML, Markdown and HTML content using this handy wrapper to the YamlMarkdown library.
by Martin Gmuca
Quick guide to develop first app for Windows 10 IoT core
by Dan Maroff
A custom ListView class that uses reflection to sort columns based on the DisplayMemberBinding's bound data type
by thomasardal
Learn about the built-in rate-limiting middleware in ASP.NET Core.
by Bhishma Anil Kajaria
Browse and Copy data from your CSV file to SQL directly without any Windows application...
by Mykola Tarasyuk
Bulk generation of tasks in TFS
by Kranthi Kumar Pothireddy
Bulk Upload in AngularJS
by prajwal rao
Burn a CD using C#.
by Igor_A
An architectural prototype of a business logic server as Windows Service. Sample service implementation and test utility.
by Terrence Sheflin
I’ve had to build several enterprise size applications over the years, and one of the biggest mistakes I ever made was to re-use the business objects as my data contracts.
by Aaginor
Add a Cancel-Button to the BusyIndicator (WPF Toolkit)
by Jagadeeswaran Natarajan
WPF passwordbox usercontrol
by _Noctis_
Quick tip for forms/windows/views where save/insert/cancel buttons are used
by Kashif_Imran
A user control that provides fancy buttons for panning purposes in Silverlight
by OriginalGriff
StringBuilder is a very useful and memory efficient way to concatenate strings, but there is no obvious similar class for byte arrays. This class adds that, and provides a flexible binary data storage medium at the same time.
by OKarpov
How to use ASM in C#.NET and most fast memory copy method
by SMPS LLC
With this tip, you can show a map in your WinForm application with the Google Maps API v3.
by Yuriy Magurdumov
Light yet functional CSV Parser with custom delimiters and qualifiers, yield returns records.
by devildx2050
C# - Naming Standards
by Shamim Uddin
Operator overloading in C#
by Karthik. A
When dynamically creating XML documents, they appear just like a normal text file. This tip is to add line breaks and indentation automatically (I posted this in my blog a while ago)
by deepi2014
This tip is to showcase how to write “Native C Library” so that it can be used for Cross Platform with .NET interoperability with Native C Libraries.
by Emiliarge
Both MS Access formats (mdb and new - accdb), MSSQL 2008 R2, MSSQL CE, SQLite, MySQL
by Emiliarge
Read and write data to Access databases without limitations caused by the use of the SQL.
by Emiliarge
Using FindWindow() and WindowFromPoint() to identify window, and SetWindowText(), MoveWindow(), SetForegroundWindow(), EnableWindow() to interact with it
by Srinivasa Dinesh Parupalli
This tip consists of my exploration of the C# 6.0 new features.
by Brady Kelly
C# 7 has the ability to declare a variable right at the point where it is passed as an out argument
by Shao Voon Wong
Easier direct memory access in a safe way
by blitzkrieged
An alternative ProgressBar for C# with extra functionality
by MarcusCole6833
I recently posted an article on how to place the data in an XML into an SQL table with a bulk Insert; this is an alternative way to do it by breaking up the XML before placing it into the Table.
by Nemo1966
How to use named pipes with Async
by Itai Basel
This article shows how to automatically initialize/reset automatic properties' default values.
by Richard Deeming
For .NET 4.0:using System;using System.Collections.Generic;using System.ComponentModel;using System.Reflection;using System.Linq.Expressions;static class AutomaticPropertyExtensions{ private static class Cache where T : class { public static readonly...
by Sascha Lefèvre
C# doesn't allow for binary literals (e.g. int bits = 0b00010101). With the helper class presented here, you can do something like that, as close as possible.
by charles922
Program that continuously monitors the NXT via Bluetooth
by Ahmed Amer Jaf
Downloading files from the Internet with one line without Freezing Form
by ehab_nour
Fast algorithm
by Rakesh Vemula
A Windows application which processes your code and shows how much time it takes to execute your code.
by Thoits
A design pattern for C# that reuses a generic base class, modifying it using a traits class to allow changes that cannot be accomplished through overrides in an inherited class.
by jawed.ace
Using this code snippet, user would be able to send an email with attachment through Outlook, Yahoo, AOL, HOTMAIL and Gmail.
by Mehul Dhorda
This tip describes a class that allows you to run a command and get its output.
by saddam abu ghaida
This article describes how to convert any Data Table to List of Objects at runtime using Reflection
by Jochen Scharr
C# CountryInfo class, LanguageInfo class and CurrencyInfo class, derived from CultureInfo respectively RegionInfo for a more intuitive and compile-safe handling of countries, languages and currencies
by Sameera Millavithanachchi
This is a custom mapper which can be used to map two objects instead of automapper
by Mark Pelf
We explain how to debug and get more information on the generic Exception “Failed to enable constraints.
by Kerdekz
Super-simplified routines to emulate real filters. Easy to implement or adjust to fit special needs.
by Mabchour 1989
Winform app to edit EDIFACT files to remove non-printable ASCII chars
by Deepraj Thuraka
Tweaking of the Bouncy Castle library to make it work with SecP128r1 curve1251
by Omar Al Zabir
VB has a With keyword that you can use to save typing same variables name over and over again. Here's a similar workaround for C#
by dzCepheus
You can limit the scope of 'p' inside your function:private void Whatever() { DoStuffHere(); // 'p' is not in scope. { var p = this.StatusProgressBar; // 'p' is in scope. p.IsIndeterminate = false; p.[etc] } // 'p' is not in...
by CaldasGSM
You are introducing a variable “p” in the local scope of the whole function :snot really.. you know you can use brackets anywhere inside the code to define subscopes, don't you:{var p = this.StatusProgressBar;p.IsIndeterminate = false;p.Visibility = Visibility.Visible;p.Minimum =...
by johannesnestler
It's not realy an alternate - but I think it should be mentioned. Most time you have this kind of code during initialization. So why not use this:StatusProgressBar spb = new StatusProgressBar() { IsIndeterminate = false, Visibility = Visibility.Visible, ...
by Brightmoore Solutions LLC
This class wraps any Type to allow it to be used only within the context of a using statement. It allows for implicit casting to T so it is pretty transpartent.Example usage: using(string scoped_string = Scope("Hello, World!")) { ...
by Federico Alterio
Convert an Event-based API to an awaitable pattern API
by dibley1973
A simple C# extension method to convert List into a delimited text string. Ideal for creating CSV files!
by D. Christian Ohle
New Rational class to solve epsilon and robustness problems especially for graphics algorithms.
by arussell
Search for file using regualar expression or classic *.*
by Member 7722695
FileStream has Lock and Unlock methods, but no way to see if file was unlocked by another process.
by Philip Ryan
Lots of forms require the Postcode AND the State, when it is a fixed relationship. Use this function and remove the need to collect the State as well.
by Pranay Rana
C# Generics with primary datatypes.
by steven-_-song
Easier GetHash function in System.Security.Cryptography.
by dietmar paul schoder
Read rows and cells from an xlsx-file: quick, dirty, effective.
by Rajasakthimaridasan
C# Inheritance Interview Point of View
by Bjørn
How to automatically initialize a class for an inherited class instance
by Andreas Gieriet
This is an alternative for "How to use the IEnumerable/IEnumerator interfaces"
by Fabrice Lacharme
Yet another Knob Control in C#
by Danilow
Simulating C# event handlers in Java
by Clifford Nelson
This tip provides examples of how to use the different arguments of the Linq GroupBy extension method.
by Beercolhol
This is a bug fix to "C# MP3 Compressor".
by Oscar K.
Mailslot Inter-process communication
by Maddog Mike B
A message server using named pipes and the Async CTP library (async and await keywords)
by One Man Crew
A NotificationCenterManager object (or simply, notification center) provides a mechanism for broadcasting information within a program.
by caed
C# - Read Text File, Match a Word in First Line, Move File if Word Matches
by SoftwareMonkeys
It's common to extract a single page from a set of records. This utility simplifies the maths involved.
by Denis Pashkov
Using background workers for traversing tree data structure.
by puja11191
This is an extension of Photo Viewer on MSDN
by Gunnar S
Implementation of the Poisson Cumulative Distribution function for large Lambdas
by arthur zamarin
Making an exe file from C# project that runs from any Windows, without must of Net Framework instaled.
by Amol B Lande
C# Print Reports/Document on server/local using shared/local printers
by Khairy Mohammed
How to run multi commands on Cmd on One process and once and Sync .
by Be with technology
This is a simple program which demonstrates how we can change the proxy settings programmatically.
by emerR46
Simple and easy to use code in resizing all controls
by Damir Sarcevic
A simple selector tool in C#.
by Ed Nutting
C# Serialisation - The Best Way
by Hydeen
How I made my 2D Game, a Mario platformer type of game. I searched around the internet for most of these things, but had trouble finding it. Especially collision detection that I ended up creating a simple solution by myself.
by arussell
C# Simple Mandelbrot with Zoom
by Hydeen
I was bored at work, so I made a classic game to entertain myself.
by Fabrice Lacharme
Yet another slider/trackbar in C#
by Ozesh Thapa
Choose your datasource and generate classes
by tochas
Code to read and parse a spritesheet coordinates file and extract the corresponding sprites from it
by Darkencrow
A multi-drawer style collapsable UI container
by Amir Dashti
A simple but powerful class to simplify packet based networking and client/server programming asynchronously
by Sympletech
A simple utility to help convert strings into other types
by Szymon Roslowski
Just another approach to understanding communication between HID devices and C#.
by marcus obrien
When trying to move into C# from C++, a little explanation of how functions can be overridden, and some of the pitfalls you may encounter.
by metastruct
When WebClient, HttpRequest, and all else fail, BITSadmin solves your download woes
by Yet another user
Creating a self installing Windows service with C#
by Virender Prajapati
Shutdown, restart, logoff, lock, sleep, hibernate windows using C# and WPF
by pgmr_64804
C# Gantt Chart For Winforms
by Peter Sun (247)
Master-detail view navigation using manageable data-driven and code-behind techniques
by Yannick Turbang
HTML WPF editor WYSIWYG (what you see is what you get).
by Sanjaykumar Patel
Speed up your computer by deleting temporary data
by deepi2014
An attempt to taking up an existing published article “C#.NET Interoperability with Native C Libraries on Cross Platform” towards the next level.
by Brad Joss
Smart phones all seem to geo tag (add GPS details) to the photos they take. However, after you copy that photo to your PC it is difficult to see, in human terms, where that photo was taken. This project parses the photo for the GPS data and opens that location on a map.
by DiponRoy
Create hash and compare
by John-ph
Resize an image and save in JPEG format using C#.
by DiponRoy
Utility class and model to manage range related operations
by DiponRoy
Calling an API which has a limit of calls per second
by Shao Voon Wong
Never compare NaN with itself!
by John-ph
A simple C# program to implement a "Random Number Guessing Game"
by Emiliarge
2 ways to read and write data to *.xls and *.xls files and display it on DataGridView.
by DiponRoy
Username and password validation process from LDAP server in ASP.NET and ASP.NET Core
by Emiliarge
Comparison of 4 browser engines and controls + some tips for using them (in attached projects and in tip text). Short and clear.
by Emiliarge
How to get and parse website content.
by Mohamed.Faried
Simplifying Java events
by Lars P.Wadefalk
I have sometimes wondered if the 'with' statement would work in C/C++, just like in pascal. Meaning that it would in it's nearest scope automatically recognize class/struct members for the ones mentioned with a . or maybe -> operator.Maybe something like:TestClass* tc;float...
by Stanski Adam
C++11: C# like properties
by Fiyaz Hasan
This article shows you how to configure the ASP.NET Core 2.0 MVC File action result to write file to response with cache headers.
by Michele Ziparo
An effective way to implement a caching system in Silverlight (MVVM) RIA
by Michele Ziparo
An effective way to implement a caching system in Silverlight (MVVM) RIA
by Latha Elangovan
Ways to improve ASP.NET web application's performance
by Mohammad A Rahman
Caching uses with Proxy pattern in C#
by Gaurav Dudeja India
Method to find out business hours in between two dates. public static double CalculateBusinessHours(DateTime dtStart, DateTime dtEnd) { int StartingHour = 9; int EndingHour = 18; // initialze our return value double OverAllMinutes = 0.0; ...
by Jani Giannoudis
Calculation of business hours (including holidays) using the Time Period Library for .NET
by Prabu ram
C# code to find the business time between two dates and to get the next business day by adding specific duration in minutes
by Mahmoud Fathy Afify
Calculate difference between two dates in day, week, month, and year parts.
by Jani Giannoudis
Get available time periods, restricted by a maximum usage count.
by Anshul R
Use Recursion.int factorial(int n){ if(n<0) return -1; if(n==0 || n==1) return 1; return n * factorial(n-1);}
by Mohammad A Rahman
It could be done using Recursive Lambda Expression, for example,class Program{ static Func Factorial = x => x < 0 ? -1 : x == 1 || x == 0 ? 1 : x * Factorial(x - 1); static void Main(string[] args) { Console.WriteLine(Factorial(5)); }}(The code...
by George Swan
Recursion is a neat way of calculating a number's factorial but there is a danger of the stack overflowing when the number is large. The following is a simplified version of the original. It obviates the need for the if else statements within the where loop.int Factorial(int input){ int...
by Andrew Rissing
Or you could just go the other direction and cache the known results ahead of time. You're only looking at 13 numbers in all, so it is not a big memory hog to just store those known values inside of the method and be done with it.static uint Factorial(uint x){ if (x > 12) throw...
by ARBebopKid
My preference for run-time speed is:long Factorial(int input){ if (input 1; input--) { if (long.MaxValue - answer < answer) throw new...
by Matthew Dennis
The System.Numeric.BigInteger class allows for calculating VERY LARGE values.I created a sample window form app to calculate the factorial of an input valueprivate void button1_Click(object sender, EventArgs e){ int inputValue; if (int.TryParse(this.textBox1.Text, out inputValue)...
by Tyronne Thomas
Calculating hash values in Windows Metro style applications using C# and .NET 4.5.
by PFalkowski
The way of calculating amount of memory occupied by some object in C#.NET
by perspolis
Calculating all permutation in C# without using recursion
by perspolis
Calculating permutation in a non-recursive way
by stastka
How to finde maximum Contrast of a Webcolor
by Qwertie
A fast and simple algorithm.
by Houssem Dellai
Developing a Windows Phone app step by step
by coder255
JSRPC.Net creates a JavaScript object with functions to call your WebAPI.
by AspDotNetDev
This demonstrates how you can call a C# method in a Windows Forms application from JavaScript that is hosted in a webpage inside a WebBrowser control on your form.
by Musakkhir
Call C# class and its method in PowerBuilder 11.
by Arjun Singh Faguda
How to call cross domain Webserver(asmx) service from jquery and bind the Json result with Jqgrid
by AspDotNetDev
Call a series of functions until the return value meets a condition without a chained-if or short-circuiting.
by cechode
Sorry, but could not resist :)Being that we we started with select case (in the launge), I felt that this was missing both the initial condition and the action to perform for the case that got hit.So given this:static Action SelectCase(T conditionValue, List<System.Tuple<Func<T,...
by AspDotNetDev
VB.NET Version (C# Version)Thanks to cechode for inspiring this tip/trick. Suppose you have the following functions:Function Step1() As Boolean Return TrueEnd FunctionFunction Step2(ByVal val1 As Integer, ByVal val2 As Integer) As Boolean Return val1 = val2End...
by Member 4694807
Sorry, but I don't like adding additional artificial elements like function arrays . I would code it as following:If isok(Step1()) OrElse isok(Step2(1,1)) OrElse isok(Step3() OrElse isok(Step4() OrElse isok(0+1) thenend ifFunction isok(ByVal rc as Integer) As Boolean ...
by FDW
I do think the approach is over complicated, but in some cases there may be (a small) benefit. As an alternative I would offer:First version (no common test):((Action)(() =>{ if (!Step1()) return; if (!Step2()) return;}))();Second version (common...
by Andreas Gieriet
This is an alternative for "Call Functions Until One Meets Condition"
by Vishal_Kumar
Call server side code using ASP.NET AJAX and jQuery AJAX
by abhinavshastri
How to Call WebService Dynamically and Read WebService Definition
by UberGeoff
An all-in-one callback gridview
by Sagar Sumant
Caller Info attributes in C# 5.0 and their usage
by Anuja Pawar Indore
Calling a C# method using jQuery on the client side.
by Anuja Pawar Indore
Create a web service name WebMethod.SVC in the CS file and add the method: [OperationContract] [WebInvoke(Method = "POST")] public void DeleteRec(string ID) { DelUser(Convert.ToInt32(ID)); }On client side, give the path and call the...
by Steven O
Another alternative is to use AjaxPro.dll. It is a library that was developed by Michael Schwarz that you simply drop in the bin folder of your ASP.NET web applications. You can find more information or download this library at http://www.ajaxpro.info.To use it:Add an HttpHandler to your...
by Phaneendra Varanasi
How to call a C# server side method with parameters using jQuery.
by arnavs
How to call a console application from the web on button click.
by Chaitanya Kolla
Adding the WS-Security Header to a request using the WCF bindings
by Wael Al Wirr
Calling webservice at runtime
by SibeeshKV
Calling an ASMX webservice from other server using jquery and PHP
by Pavel Durov
Calling async function inside lock block
by CathalMF
Describes with an example of how you can call C#.NET methods from unmanaged C++ code.
by Albin Abel
When to call master functions through a contract (abstract class, Interface etc.,)
by Ankur .K. Vishwakarma
Calling server-side code from client-side using JavaScript and TextBox's onblur event
by DiponRoy
Configure JSON serialization settings
by Steve Wellens
Misuse of the C# var keyword.
by AspDotNetDev
I agree that in the above example, the use of var is a bit excessive. However, for very long types (such as a dictionary with the key and value both being lists of some nested classes... see below code example), this might actually improve readability (seeing so many details may overwhelm you). Assu
by AdrianRivera
I think this is a nice future, for example look this code:Dictionary > myDic = new Dictionary >();We really need to tell the compiler in this expression what the type of myDic is?This is more concise and clear at...
by supercat9
If the right-hand operand of an assignment is a "new", there's no need to explicitly specify the type of the new variable being created unless the new variable will have to hold items of a more general type than the right-hand operand would indicate. I would consider the code clearer without the...
by Chris Randle
I've always used var because ReSharper suggested it by default. However, like most people, I only did this when I didn't understand the conotations of ReSharper's suggestion. Now I disable this suggestion in the plug-in, and in actual fact, I prefer to use the fully qualified name on at least...
by Quirkafleeg
The original question was whether this practice can lead to misuse. Of course it can - almost everytime it is used! In the "real world" (business), most programmers spend their days working amongst reasonably old code with several bolt-on fixes. It becomes increasingly hard to maintain because...
by Aviad P.
Can the C# ‘var’ keyword be misused?
by jayant jaiswal
Captcha code
by Bob Stoom
New drag-and-drop intuitive engine on the OCR MODI base
by maftahur
Capturing web screen in different formats without any browser(PhantomJS)
by Kubajzz
How to avoid performance problems when capturing audio only (or video only)
by Kaveh Yazdi Nezhad
A simple solution to capture entire HTML code of a web page which is displaying on Internet Explorer
by konamiman.MSX, Erich Ledesma
Problem detected while testing a parallel consumer had a very dark explanation and a very simple solution.
by Kashif_Imran
A simple Caret for WPF User Controls
by Sanwar ranwa
How to create a cascading dropdown using ReactJS and Web API
by Christiaan van Bergen
How to perform XPath queries on all lower case elements
by Ghosuwa Wogomon
An in-depth explanation of correct bracket placement and why...
by Sergi Ortiz Gomez
Optimizing mass queries in Blazor by enhancing interoperability between JavaScript and C#, with a focus on performance improvements.
by honey the codewitch
Easily convert identifiers from one casing style to another with this simple to use class
by Thomas Daniels
In this tip, I tell you how to cast an IEnumerable to an IEnumerable(T)
by Madhav Hatwalne
Caution when you are disabling a checkbox in Edit View
by CoderPanda
This tip is a continuation of my series on CCDA XML Generation. It talks about how to quickly get up and running on generating CCDA documents.
by DaveyM69
How to prevent a CD/DVD drive from being opened.
by Steve Maier
To get this to work in .NET 4, you have to change the DLLImport signature.[DllImport("kernel32.dll", SetLastError = true)]private static extern IntPtr CreateFile( string lpFileName, uint dwDesiredAccess, int dwShareMode, ref SECURITY_ATTRIBUTES lpSecurityAttributes, ...
by Sitang Ruan
Central jQuery Version Control
by Sitang Ruan
Implement a central jQuery verion control from code-behind.
by Andrej Kamikovski
How to copy files to central place set in configuration or setup directly with visual studio build task
by honey the codewitch
A small library for providing baseline Context-Free Grammar computations
by StM0n
A small class to simplify creating an array with the help of a fluent interface... sort of.
by Andreas Gieriet
A generic fluent implementation for a prioritized IComparer class
by Ank_ush
How to change the background color for an MDI parent form in Visual C#This article demonstrates how to programmatically change the background color for a multiple-document interface (MDI) parent form by using Visual C#.When you use a Windows Form as an MDI parent form, the Application...
by Philipp_Engelmann
A small tool I made to easily change the background image of the login screen.
by Nadege Rouelle
Let's see how to define our own database name using Entity Framework Code First
by Yumashin Alex
This tip describes how to change DataGridView behavior concerning row resizing
by Harvey Saayman
Below is an example of changing the individual row colors based on one of the DataGridView's columns.While this is not hard to do, the property isn't always where you think it should be, its hidden within the rows DefaultCellStyle property.Here's the example:foreach (DataGridViewRow...
by dwilliss
Another way to do something like this is to handle the RowPrePaint event and change the background there. The advantage to doing it this way is that if you have thousands of rows, you don't have to set it for every row at the beginning, which could take a few seconds. This way only sets it for...
by Lakhan Aanjana
If cell color is depend on criteriaif (ca.con.State == ConnectionState.Closed) { ca.con.Open(); } string qry = "select * From productmaster "; SqlDataAdapter da = new SqlDataAdapter(qry, ca.con); DataSet ds1 =...
by A. Najafzadeh
This tip shows how to change LINQ-to-SQL connection string at runtime via programming.
by RaviRanjanKr
A tip which enables you to change Opacity of Image in C#
by Kees van Spelde
How to change resolution before starting an application
by C Yang
Program to Switch Screen Setting In One Click
by Brijesh Kr
Change System Date Format At Runtime
by Daniel Ziegelmiller
How to track changes in the ObservableCollection displayed in a WPF DataGrid
by ferragus
Change WPF DataGrid Styles in code behind
by DaveyM69
How to access a control from a different thread + good alternatives by other members!
by AspDotNetDev
This version works regardless of parameters:public void AnyMethod(int parameter){ MethodInvoker wrapper = new MethodInvoker(delegate() { // Do your thing here! }); if (this.InvokeRequired) this.Invoke(wrapper); else wrapper();}Note also...
by Moim Hossain
Doing like following for few years now :public void AnyMethod(int parameter){ var wrapper = new Action(()=> { // Do your thing here! }); if (this.InvokeRequired) this.Invoke(wrapper); else wrapper();}
by NeoPunk
Changing App.Config on the fly for unit testing
by EbenRoux
An alternative is to abstract the settings that you intend to use.So instead of changing your app.config on the fly, simply change a mock or the instance values of the configuration object.For example:public interface IApplicationConfiguration{ string MaybeAFolderINeed { get; } ...
by Matthew Givens
How to change databases at run-time in a user-friendly manner.
by alrosan
How to change input language
by Manfred Rudolf Bihy
Using SendMessage and the PARAFORMAT structure, one can easily change the line spacing in a RichTextBox control
by Mustafa Ismail Mustafa
In your form, I usually set this in the enter event of the control (usually a textbox).InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(InputLanguage.FromCulture(System.Globalization.CultureInfo.GetCultureInfo("en-US"));Of course you can substitute the Culture to...
by HMuhammad Kamran
If you didn't know better what would be your InputLanguage, just by simple code you can list all the installed languages, and choose from them.public void GetLanguages() { // Gets the list of installed languages. foreach(InputLanguage lang in InputLanguage.InstalledInputLanguages)...
by Purushotham Agaraharam
Dynamic changing of version number using SolutionInfo.cs through out the application.
by Jens Eckervogt
There are new convertions for C#
by honey the codewitch
Enumerate store and retrieve characters as sets of ranges using this efficient struct
by Trilok Arora
Introduction to Charts in .NET 4
by IssaharNoam
Simple and customizable Chat Conversation control, with DataTable datasource, inspired by SMS application balloons in OnePlus One Android smartphone.
by Peter Sun (247)
Implement ChatGPT API in C# WPF with GPT3.5-turbo
by Mohssine EL HARFI
CheatCodeLite to trigger events when a cheat code is caught using keyboard
by Nasser Malik
Check all checkboxes in GridView using jQuery.
by TarunSingla
Solution to check for balanced parentheses in a string where parentheses are defined as (, [ or { and their respective "closing" parentheses.
by Fabrizio Stellato
This code provides your application a - check for updates - feature
by Manish K. Agarwal
Check for Windows 7 Protected Folders
by Ravimal Bandara
An implementation of ray-casting algorithm to check if a given point is inside or outside the polygon.
by Carlos Mendez Comas
The Pharming is an attack difficult to detect for the user does not have idea what it going on.
by Surjit Singh Dadhwal
This post will help you to resolve problem of checking maxlength of Multiline textbox (Internet Explorer, Chrome & Firefox)
by SergVoloshyn
Main program for testing modem or GSM phones by AT commands, use only standard classes and libraries.
by Ordiales
Create default interface implementation or whatever you want with runtime checking not implemented members
by Fenil Desai
Check which .NET Framework version is installed from command line
by Tamer G. Ahmed
Check/Uncheck all checkboxes in a CheckBoxList (one control).
by Santhosh Kumar Jayaraman
Silverlight doesn't have a ListBox control with a checkbox. In this article, I describe how to achieve that functionality in Silverlight using MVVM.
by suhas.shiv
Custom CheckBoxList in ASP.NET MVC3
by Mishra Sourabh
This tip explains how to create a checkboxlist in MVC.
by Amit Sanandiya From Morbi
Display Selected Column Dynamically Using checkBoxList in Wpf With C#
by Gandhi Ashish
Checking Internet Is Connected Or Not From .NET
by J a a n s
For C# guys....using System ;using System.Runtime ;using System.Runtime.InteropServices ;public class Internet{ [DllImport("wininet.dll")] private extern static bool InternetGetConnectedState( out int Description, int ReservedValue ) ; public static bool...
by Anshul R
Dim value As Boolean = My.Computer.Network.IsAvailable can be used in a situation where the only network a system will be connected to is the Internet.Dim value As Boolean = My.Computer.Network.Ping(hostNameOrAddress ,timeout) hostNameOrAddress can be any valid website -...
by TarikHuber
Easy library for checking VAT Numbers of European Companies. Only usable with an German VAT for non German VAT!!!
by Pawel Gielmuda
Check if windows is 64 or 32 bit using WMI
by Santoshshrest
How to show the checked items of the check list box in listbox?
by Santoshshrest
How to set the check status of the checklist box?
by Froghut
Download source and example project - 64.37 KB IntroductionSome time ago I had to use CherryPy in one of our companys projects. To quote the website, 'CherryPy is a pythonic, object-oriented HTTP framework.' - but the feature I found the most usefull was that you can expose methods...
by Sarang Date
Introduction My Colleagues Guru and Amit brought an interesting discussion on the use of timers in a multithreaded environment. I have tried below to clarify a few things about different timer classes and their usage scenarios with pros and cons. This info is based on the various blogs I...
by Cinchoo
Simple and easy to associate file types to an application
by Cinchoo
Consuming and storing complex user defined object as configuration member values
by Cinchoo
This article show how to consume Windows registry information using Cinchoo Configuration Manager.
by Cinchoo
How to compare two CSV files for Add, Deleted and Changed records using Cinchoo ETL
by Cinchoo
Tips to convert complex nested JSON file to CSV format file
by Cinchoo
Tips to converting CSV to JSON with nested objects and arrays
by Cinchoo
Tip to convert JSON to XML with namespaces using Cinchoo ETL
by Cinchoo
Use Cinchoo ETL to deserialize selective XML nodes from large XML file
by Cinchoo
Tip to deserialize JSON to polymorphic classes without type information
by Cinchoo
Tip to merge different CSV files into one CSV file using Cinchoo ETL
by Cinchoo
Tip to merging JSON array values to single CSV column
by Cinchoo
Quick tutorial about parsing large JSON file as stream
by Cinchoo
Quick tutorial about converting JSON to CSV file using Cinchoo ETL
by Cinchoo
Quick tutorial about converting JSON to XML file using Cinchoo ETL
by Cinchoo
Quick tutorial about converting JSON to YAML file using Cinchoo ETL
by Cinchoo
Easy way to sort large CSV files using Cinchoo ETL
by khanzzirfan
Creating circular arrow of an svg image
by Mitesh k Prajapati
This is a WPf circular indeterminate progressbar and you can use this in your application for loading processes which are in an indeterminate state.
by Manjeet_Singh
Using CKEditor in ASP.NET without using AJAX assembly files.
by Himashu Arora
by khalid_se
Claims and Token Based Authentication with ASP.NET Web API
by jelo pasiolan
This class is useful for HTTP web request and gets the response from the server. If the response is JSON or XML, this class also contains a method to parse or deserialize the response.
by Oscar K.
Internals, code of using QMString
by Oleg_100
Synchronize access to multiple objects by name (string)
by rodrigo diniz
A small class that transforms the contens of an OFX file into a DataSet.
by #realJSOP
One way to effectively zero the columns any DataRow object.
by benji_dv
How to clear all events is quite simple. It needs a finger of reflection...
by Narendra Singh Rathore
How to clear all textbox text on one click
by Rixterz123
How to get text to show perfectly clearly on Aero glass
by Albin Abel
Like HTML images, we can have clickable areas in a picturebox of windows application
by Mike_999
Download GridDetailsView.zip - 143.06 KBIntroductionThis is one of the frequently asked question among developer community.How to display a form which shows content of a DagaridView row while clicking on it. Here I am demonstrating DataGridViewLink column type usage for this...
by Johnny J.
How to work around a ClickOnce limitation
by sumit_kapadia
Create and Bind gridview at client side with Jquery Template and ajax in asp.net
by markmnl
Method to clone an EntityObject without serilization or detaching it
by PIEBALDconsult
Using Reflection to instantiate an Exception of a given type
by Andrew Rissing
I would actually go the route getting those developers to follow good practice. As a whole, the field would be better off if developers like that were mentored rather than something like this.So, I would recommend using either of the techniques you put forth originally (using the Data...
by charles henington
[Serializable]...
by RaviRanjanKr
How to close Form at pressing of Escape Button.
by johannesnestler
Your tip is useful for main forms with no close or cancel button. But most time you will want the "escape-close-form-behaviour" only with dialogs. This is the recommended way to do it: (Now i see Indivara already mentioned it in the comments)using System;using...
by Fun@learn
Lightweight approach to close view from viewmodel command.
by Shriniwas Shukla
CLR is not allowed managed code to catch access violations and other corrupted state exceptions
by Andrew Rissing
How to get that last little nagging line to be covered...
by Sourav Kayal
Various approaches of Entity Framework with examples of code first approaches
by Sourav Kayal
In this tip, we will discuss code first migration using Entity Framework
by Sourav Kayal
In this tip, we will learn to migrate database when multiple DbContext is present in the same application.
by MarkWardell
Use this method for setting path on a map given [current position, heading, and distance]
by Mirko Rezzin
Explain how to implement code generation and inheritance in a WCF service
by Moustafa Farhat
small example to show how to used Regular Expressions for code highlight
by Simon Dufour
Check you code out, you'll have problem if you start editing from INSIDE. You change your SelectionStart without deselecting anything.. this mean that selection changes instead of only having your cursor moving.foreach(Match m in mc){ int startIndex = m.Index; ...
by Tomer Weinberg
A piece of code you can copy paste to transform TimeSpan into user readable UI text
by Gerardo Recinto
A Tracer API, simply. :)
by honey the codewitch
A helper class that dramatically reduces the amount of code you need to write for the CodeDOM
by Nils Paluch
This tip demonstrates how to use the buildin SQLite stack of Entity Framework 7 on desktop and mobile applications.
by Hemant__Sharma
I always find this thing while doing code reviews and that is a performance issue. The above point I haven’t found anywhere as a performance issue, so I thought to share it.Scenario: There is a function in which one need to extract 10-20 values from an object for example a column value from...
by Tecfield
Collapsible ListView
by rwmao
A simple example of how to use Collapsible Panel in ASP.NET, especially in VS2008
by Yuriy Nelipovich
The LogJoin tool helps to collect any unstructured data from text files and join it to a simple table representation for easy analysis.
by Pavel Kabir
This tip is about how to get collect the values for all instance fields of a given type.
by Matus Kovacik
This component allows to overlay grid with colored blocks spanning across multiple columns.
by NYCChris
I love Code Project, this site has helped me quite a number of times. So whenever I have something I feel is worthwhile I will post it.The other day I needed an algorithm to tint one color with another by a percentage amount. So here it is if anyone needs it. private static Color Tint(Color
by Shah Ankita
This code sample demonstrates how to set color to any control using colorpicker. For this, you have to create a new Windows phone app.
by Wu Yehao
A ColorSelector control used in GIS Applications, with a menu button for displaying
by OriginalGriff
How to colour the individual cells of a DataGridView according to their content. For example, negative values can be Red, positive values Green to show "Up"s and "Down"s more easily.
by kabdolla
Create your own keyboards, keypads/ virtual buttons on top of other windows; filter unwanted input.
by OriginalGriff
There is a problem with accessing Excel files via OleDb which contain more than 255 columns: they are truncated and need to be fetched using ranges. But what do you do with DataTables after that?
by Mario Z
Combining multiple .NET assemblies by customizing MSBuild's project file.
by jelo pasiolan
This article, along with real code, combining SqlConnection and SqlCommand in one Class
by wkiess01
How to sort a data bound combobox
by B.O.B.
A simple extension to add an item that has a data source bound to combobox.items