C# Programming Tutorials

C Sharp Programming Tutorials And Articles
  Title / Author Replies
WPF (Windows Presentation Foundation) is a Microsoft’s technology for creating rich client applications. WPF applications are more interactive, aesthetic and flexible as compared to their traditional counter parts The Windows Form applications. WPF is a subset of Microsoft’s famous .NET framework. ...
If you go through any standard C# books you will see the constructors and so I would not get into the details of the constructors but what is more important to me is the use of static constructors which is somethine new in C# or you can say that its a copy of initiliazation block in Java. ...
Encryption/Decryption file, string etc using C# using System; using System.Collections.Generic; using System.Text; using System.Security.Cryptography; using System.IO; namespace BHI.Rats
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...
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...
A WPF Window is integration of multiple elements. Top level elements such as Window, layout containers such as StackPanel, DockPanel, Grid etc. and control elements such as text boxes, buttons, menu bars and tool bars etc. All the control elements in WPF derive from System.Windows.Control base...
To start with include namespaces using System.Diagnostics; // For prcesss related information using System.Runtime.InteropServices; // For DLL importing Now declare these variables private const int SW_HIDE = 0; Now declare win32 function ShowWindow
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;
Windows Forms text boxes are used to get input from the user or to display text. The TextBox control is generally used for editable text, although it can also be made read-only. Text boxes can display multiple lines, wrap text to the size of the control, and add basic formatting. The TextBox...
The .NET Framework has built-in support for globalisation in its System.Globalization namespace. This namespace can help you build international support into your applications. If you plan your applications to include support for an international audience, the cost to develop them isn't much...
C# allows you to define two types of variables: value types and reference types. The value types hold actual values, while reference types hold references to values stored somewhere in memory. Also value types are allocated on the stack and are available in most programming languages. Reference...
Introduction I happen to edit the collections many times in the foreach loop and run into problems and then each time I got a different solution when going to Google, So first I would try to list each of the solution and then discuss them so that we all can have the best practice in the...
Introduction This solution describes an approach how to send email messages with or without attachments. Background The EmailProgram class is used to send email messages with or without attachments. The code
Introduction The OpenDocument Format (ODF) is an XML-based file format for representing electronic documents such as spreadsheets, charts, presentations and word processing documents. The standard was developed by the OASIS (Organization for the Advancement of Structured Information Standards),...
Introduction AdWords is Google's flagship advertising product. AdWords offers pay-per-click (PPC) advertising, and site-targeted advertising for both text and banner ads. The Google AdWords API lets developers build applications that interact directly with the AdWords platform. With these...
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...
In my last article, Complete Threading Tutorial in C#, I explained basics of threading. I explained that how threads can be created, how locking is implemented to make your applications thread-safe and how exception handling is implemented in threaded applications. This article explains some more...
Most of the time, a developer needs to read or write data from a location outside the memory of the program. This location can be a text file, a network connection a database or any other source of data. In order to deal with such sources of information, .NET Framework provides a set of classes...
WPF content controls are a specialized form of WPF controls and are used to store content either entered by the user or read from any other data source. Content controls can contain only one child element. This is unlike layout controls such as Grid, WrapPanel and StackPanel controls that contain...
Almost every software application has to deal with some sort of text information. This information can be the content of some email, a network message or some input value obtained from the user. WPF contains Text controls for this purpose that can be used to get input from the user. Similarly, to...