C# Syntax samples and examples

You can make money from this site by posting original and quality articles that comply with Google AdSense policies.. Also, we offer several other reward programs including monthly profit sharing, cash rewards per post, contests & prizes etc to contributing members.

Submit Your Article


How to validate a string in textbox control for password in C#

Here I have given an example for a password validation code snippet by using very simple and basic common algorithm through textbox control in C#. In this rules of password validation, you are allowed to type any alphabet, numeric and special characters as password value.

Serialization and Deserialization in C#.Net

In this article I will explain basic concept of serialization and desalinization with an example. Here I will explain how to convert a csharp object to xml and vice-verse. But why do I need to Serialize them? The below example answers the above question.

Bind XML Data to List

In this article, I will explain how to bind XML data to List. Using XDocument of System.Xml.Linq , XML document can be loaded to XDocument by providing url of the XML document. Using IEnumerable, Xdocument descendant can be binded to the list.

How to count salary of a sales man using C

in This article am sharing some source code for counting salesman salary Want to learn count salary of a sales man using C ? Check out this article.here I have provided the source code to count salary of a sales man using C Programming. this article only for beginner in C#

Functional Programming using C# 4.0 – Functional Composition

C# 4.0 treats functions as regular objects which enables programmers to use functions as arguments of other functions. Functions those take other functions as arguments are technically called as higher order functions. Functional composition is one such example of higher order functions. Functional composition is a functional programming concept in which two or more functions can be combined to compose a higher order function.

How to drag and drop?

This code helps to copy or Move user's text from one text box to another text box. In this resource user can get help to drag and drop text. In this resource user can copy text by pressing CTRL key and then drag that text.

Show an animated loading GIF image on a Windows Form (c#)

Hi friends, Show an animated loading GIF image on a windows form with the help of backgroundWorker class in C#. My friends before start I want say that this is not the only way to attain this process. I think this is easy, so i post the code here.

Relational operators in C#

in C# and another programming languages ,we have to deal with many decision making problems.In C# we use Relational operator for solve decision making problems. In c# we have Six relational opertor.Today we well learn how to use these relational operator in C#

Increment and decrement operators in C#

In C# Programming language we use increment and decrements operators for increase or Decrease value of variables.these variables are used as prefix and post-fix expression .in this C# code we will see how to use them in program.

Use of this reference in C#

C# is advance language that have feature of c,c++ and java .this reference is one of them. this reference is used to refer to current object of the program and not used by a static member function.in this code we will see how to use this in C#.

Overriding Method in C#

in C# we can override default method.you need to override the method of a super class in a sub class to change the functionality of super class method. today we will create see how to override method use in C#.

Using while loop in C#

In C# loop statements are use for execute set of commands at specific time .you can set the loop,how long it will be execute.today we will use while loop for execute statement five times and in output we get how many time loop execute

3 small things in C# code

The below code snippets will give the clear idea about the 3 things which can be used in the C# best practice code while implementation in any project.

Submit Your Article