NetProgrammingHelp.com
Asp.Net,C#,Ajax,Sql server,silverlight,Javascript codes exambles articles,Programming exambles

'C#' Category

What are the new features in C# 3.0/Understanding new features in c# 3.0

Posted by James Categorized Under: C# 7 Comments

Introduction: In this article,i am going to explain about some new features in C# 3.0.There are, 1.Implicitly typed local variables, 2.Extension Methods, 3.Anonymous types, 4.Object Intialisers, 5.Lambda Expressions, 6.Automatic Properties, Main: C# 3.0 provides a new keyword , var, which can be  be used in place of int, bool or string. Implicitly typed local variables [...]

How to use c#/csharp unsafe code in asp.net

Posted by James Categorized Under: C# one Commented

Introduction: In this article, i am going to explain about how to use/perform the c# unsafe code option in asp.net application. Main: The unsafe is nothing but the code is straighly accessing the memory.In c# we are using unsafe keyword for defining unsafe code. Memory is accessed in C# using a special data type called [...]

How to Use Delegates/Interfaces in windows forms

Posted by James Categorized Under: C# one Commented

Introduction: In this article i am going to explain about how to use c# function pointer delegates and interfaces in windows forms. Main: Before stating this article,we must know what is delegates? Delegates are function pointers, Delegates are type-safe and object oriented, Delegates hold references of one or more functions and invoke them as needed, [...]

How to Detect/Find Network Or Host Availability Using Asp.Net/C# 4.0/Ping

Posted by James Categorized Under: C# 4 Comments

Introduction: In this article,i am going to explain about how to detect network or host availability using asp.net. Main: ASP.NET has a ping interface that supports synchronous and asynchronous operations, For ex, System.Net.NetworkInformation.Ping ping = new System.Net.NetworkInformation.Ping(); System.Net.NetworkInformation.PingReply reply = ping.Send(“yahoo.com”); Console.WriteLine(“address: {0}”, reply.Address); Console.WriteLine(“options: don’t fragment: {0}, TTL: {1}”, reply.Options.DontFragment, reply.Options.Ttl); Console.WriteLine(“rountrip: {0}ms”, reply.RoundtripTime); [...]

How to Create Read Write a Binary File Using C# 4.0/Asp.Net

Posted by James Categorized Under: C# 5 Comments

Introduction: In this article, i am going to demonstrate how to create,read,write a binary file using C# 4.0. Main: When you open files in binary mode, you get back a stream that you can control more precisely than with text. See this below simple examble, class Program { static void Main(string[] args) { if (args.Length [...]

How to Use/Create Complex Numbers in Asp.Net/C# 4.0

Posted by James Categorized Under: C# 3 Comments

Introduction: In this article, i am going to demonstrate how to create a Complex numbers using asp.net and C# 4.0. Main: Many engineering and mathematical problems require the use of imaginary numbers, often represented in the form 4+3i, where i is the square root of -1. See this below simple examble, Use the System.Numerics.Complex class [...]

How to Use the Null-Coalescing Operator (??) in C# 4.0

Posted by James Categorized Under: C# 10 Comments

Introduction: In this article,i am going to explain about how to Use the Null-Coalescing Operator (??) in C# 4.0. Main: If You want to simplify checking for null values Null-Coalescing Operator (??) is the simple and best option.For ex This is a common situation, where you need to check for a null value before you [...]

C# Contextual Keywords

Posted by James Categorized Under: C# one Commented

Introduction: In this article,explained the c# Contextual Keywords with simple definition for better understanding. Main: from Used in a LINQ query. A query expression must begin with a from clause. get Defines an accessor method in a property or indexer. It retrieves the value of the property or indexer element. group Used in a LINQ [...]

What is C# Constructor?

Posted by James Categorized Under: C# one Commented

Introduction: Understanding constructors is very important for Object oriented designers and programmers.In this article,just i am trying to explain the concept of constructors and its uses. Main: Defn: A constructor is a member function that has the same name as the class name and is invoked automatically when the class is instantiated. A constructor is [...]

Effective Use of c# Properties

Posted by James Categorized Under: C# Add Comments

Introduction: In this article helps you to understand c# properties and its uses. Main: Definition: Properties are members that provide a flexible mechanism to read, write, or compute the values of private fields. Properties can be used as though they are public data members, but they are actually special methods called accessors. This enables data [...]