C# Programming Tutorials

C Sharp Programming Tutorials And Articles
  Title / Author Replies Reverse Sort Order
If you program in more than one language, sometimes you want to use an phrase or expression from one language in the other, when it does not exist you have to invent it for that language. Nested functions are functions defined within functions. They can be useful for compartmentalizing behavior...
Introduction The parser gives you a place to start to write an XML parser in C#. We have used the System.Xml. The code public void ParseFile(string strPath) { XmlTextReader xmlReader = new XmlTextReader(strPath); int iTab = 0;
Introduction How to capture the errors from application and write it in a log file. We have to mention the directory path in Webconfig file. Background This code is to capture the error log in log file with all information. The code
Entity framework is Microsoft’s latest data access technology and is considered a replacement for ADO.NET. However, there are still plenty of features where ADO.NET beats entity framework, but developers are now switching to Entity Framework owing to its strong decoupling and separation of concerns...
Delegate.Invoke Delegate.Invoke is used to execute a delegate on the current thread. A delegate is just a reference to a function or method, and Delegate.Invoke is the mechanism to call this function or method (similar to a normal function call). Delegate.BeginInvoke Delegate.BeginInvoke...
Introduction Before designing a class, we should have a very clear understanding about constructor. In this article I will discuss definition, types and features of constructor. Definition A constructor looks like a special method having no return type and its name is same with the class...
Grid layout is one of the most widely used layouts in any WPF application. The basic concept of a Grid is that it divides the window surface into grids of invisible rows and columns to which other controls or layouts can be added. Grids are usually invisible but can be made visible for debugging...
If you are beginner to LINQ, I will suggest you to first read Introduction to LINQ. However, if you have read that article or have some basic understanding of LINQ queries and lambda expressions, you can carry on with this article. In this article, I am going to explain you some more advanced LINQ...
In almost every software application, you need to handle a list of data of any type. The list can contain, users registered on the website, the list of items purchased by the user or the list of items that have been sold and so on and so forth. In order to handle lists of data we have data...
The array is one of those data structures which have been in use since the advent of the programming languages. Be it C, C++, Java, PHP or any other web-based, desktop or mobile application development, you will find an array data structure to hold records of data. Syntax may be different but the...
In my recent articles, I have been walking you through some of the most commonly used types and interfaces that play integral role in storing collection of items. We have previously studied Lists, Stacks, Queues and other collections. I have also explained Array class and its usage in one of my...
LINQ (Language Integrated Query) is arguable one of the most astonishing features of the .NET framework. If you have slightest idea of database programming, you must have written SQL queries. Something like “Select * Name From Customers”. This line was actually used to get names of all the...
LINQ is Microsoft’s latest data access technology. LINQ stands for language integrated query and it can be leverage to execute complex queries in a simple and more understandable manner. LINQ provides diverse query execution functions with the help of special methods that are known as query...
XML stands for Extensible Markup language that is most commonly used for transferring information over the World Wide Web. XML documents are simple to write as well as understand both for humans as well as for software applications. If you come across an XML document, with little attention, you can...
XML documents are a standards described by World Wide Web Consortium (W3C) that are used for transferring information over the internet. The .NET Framework provides several namespaces and classes that allow developers to read, write and interact with the XML documents. In my article on LINQ to XML,...
Garbage collection and memory management is probably that domain of programming where .NET Framework beats most of the other application development platforms. Most of the time, garbage collection is automatically done by .NET runtime once the object gets out of scope. When a .NET object is not...
.NET Framework comes with a set of debugging tools. Particularly if you are using and advanced IDE such as Visual Studio, you can use debugger and other diagnostic tools available in the IDE. This debugging, however, is only applicable during the development of the application. Once the application...
Often times, applications need to perform multiple tasks at a time. I always share Microsoft’s word processor’s example. While you type in the word processor, the application lets you type and in the meantime it is running spell-check and dictionary in the background to inform you whenever you type...
Most of the advanced .NET applications that you develop need to communicate with other applications. For instance, for downloading or uploading data to some remote server, networking is required. In order to send or receive email via SMTP or to send and receive webpages via an HTTP protocols, some...
In synchronous programming, the user needs to wait for the method completion. In asynchronous programming, the calling thread starts the method and executes concurrently. The message queuing operates asynchronously. The client does not wait for the server to read the data. Message queuing...