C# Corner

Resources  
  • FileDownloader : Download files using HTTPJan 10, 2000. This application contains a Form and a Class module . From Form we create a thread which execute the procedure to handle the NET download. This application can be enhance to do more down load as in Download manager by creating more threads.
  • Read a file using C#Jan 15, 2000. This program just demonstrate the use of FileStream & StreamReader.
  • FileStream : Read or Write Data StreamsDec 13, 2000. FileStream class can be used to read/write data to a file with the help of StreamReader and StreamWriter classes.
  • Handling Mouse Events in C#Jan 25, 2001. This article explains how to handle mouse events in C# or VB. In C#, you write a delegate and then write an event handler.
  • Using the ref ParameterMar 06, 2001. The ref keyword on a method parameter causes a method to refer to the same variable that was passed as an input parameter for the same method. If you do any changes to the variable, they will be reflected in the variable.
  • ADO.NET DataSet ProgrammingMar 20, 2001. A sample project shows you how to add, edit, delete, navigate, save records in a database using DataSet.
  • Developing Web Applications in VS.NET Mar 29, 2001. This tutorial describes about Step-by-step tutorial guides you towards developing your first web application.
  • Naming Guidelines in .NETApr 20, 2001. Commenting and following a uniform naming guidelines in your code is one of good programming practices to make code more useful.
  • Find Files in C#May 01, 2001. I have developed a small application in c#, which helps in searching u'r hard disk for files of the desired extention.
  • Line Numbering Utility in C# and JavaMay 08, 2001. This is the first of the series of programs I wish to write to help myself get a handle on C#.
  • Serializing Objects in C#May 14, 2001. In simple words serialization is a process of storing the object instance to a disk file. Serialization stores state of the object i.e. member variable values to disk. Deserialization is reverse of serialization.
  • The out and ref Paramerter in C#Jun 12, 2001. The out and the ref parameters are used to return values in the same variables, that you pass an an argument of a method. These both parameters are very useful when your method needs to return more than one values.
  • Exception HandlingJun 12, 2001. Exceptions in C# provide a structured, and type-safe way of handling both system level and application level error conditions. The exception mechanism in C# is very similar to that of C++, with a few important differences.
  • Using ref and out ParameterJun 20, 2001. When we pass a parameter as ref to a method, the method refers to the same variable and changes made will affect the actual variable.
  • Creating a screen saverJun 21, 2001. Creating a screen saver is an interesting topic. A screen saver is a maximized form that contains no borders and caption.
  • Time TickerJun 26, 2001. Graphics Class encapsulates a GDI+ drawing surface. The FromHWND method is used to create a new instance of the Graphics class from a window handle. Clear method fills the entire drawing surface with the specified RGB color by using Color class. DrawString method draws a string using Font and SolidBrush classes.
  • What & Why : Properties :: Part 2Jul 09, 2001. In the part 1 of this series, I discussed about the get method of the properties, with the help of which you can make your variable so that nobody can modify the value of the variable.
  • Exception HandlingJul 21, 2001. Exceptions in C# provide a structured, and type-safe way of handling both system level and application level error conditions. The exception mechanism in C# is very similar to that of C++, with a few important differences.
  • ASP.NET and VB.NET Error HandlingAug 24, 2001. ASP.NET and VB.NET both are providing excellent error handling options when compared with ASP and VB6. In VB.NET we can make use of the structured way of error handling with the Try & Catch statement.
  • Is there any need to Boxing and UnboxingSep 21, 2001. With Boxing and unboxing one can link between value-types and reference-types by allowing any value of a value-type to be converted to and from type object. Boxing and unboxing enables a unified view of the type system wherein a value of any type can ultimately be treated as an object.
  • Exception Handling in C#Oct 17, 2001. Exception handling is a builtin mechanism in .NET framework to detect and handle run time errors.
  • Pointers in C#Oct 25, 2001. C# also supports pointers in a limited extent. A pointer is nothing but a variable that holds the memory address of another type. But in C# pointer can only be declared to hold the memory address of value types and arrays.
  • Exceptions and Exception StackNov 16, 2001. The purpose of this tutorial is to explain firstly how you would go about creating your own set of exceptions to trap error conditions that could occur in your code or library, for your own benefit or for the benefit of another developer using your library. The second lesson is on how the C# exception stack works, and how you can use it to catch all types of exceptions.
  • Event Handling in C#Dec 10, 2001. This article shows you how to write control, mouse, and keyboard event handlers in C#.
  • Observer and .NET event delegatesDec 17, 2001. The purpose of this article is to try to introduce observer pattern and compare it to .NET event delegate handling of notifications.
  • Exception Handling in C#Jan 03, 2002. In C# Exception is a class in the system namespace. An object of an exception is that describe the exceptional conditions occur in a code That means, we are catching an exception, creating an object of it, and then throwing it. C# supports exceptions in a very much the same way as Java and C++.
  • Bridge Patterns in C# Jan 17, 2002. Bridge Pattern is commonly known as Handle/Body idiom in C++ community. This pattern is used for decoupling an abstraction from its implementation so that the two can vary independently.
  • C# Discussion Forum from Harrison LogicJan 29, 2002. Threaded Discussion Forum that utilizes the .NET framework, with C# as the ASP.NET server side language. Uses MS Access Database for data.
  • .NET Static Variables : Better than Application!Feb 22, 2002. In traditional ASP, we always had the Application object to store application-wide variables in.
  • xBase Engine for C# and VB.NETFeb 25, 2002. This library is written to handle DBF files from C# or VB.NET applications.
  • A Shaped Windows Forms Application with Variable OpacityMar 11, 2002. This application demonstrates two simple techniques that beginners might find useful in developing creative new looks for Windows applications.
  • Event Handling in .NET using C#Mar 13, 2002. In this article I discuss the event handling model in .NET using C#. The discussion starts with an introduction to the concept of delegates and then it extends that concept to events and event handling in .NET.
  • SQL Server Database ExplorerMar 20, 2002. This application connects to a running SQL Server 2000 and displays all the available databases in it.
  • MP3 JukeBoxApr 30, 2002. This is stable code and more generic than the first release. It has better error handling now to make it more 'idiot proof'.
  • Custom Error Handling in ASP.NETMay 30, 2002. Structured exception handling is a fundamental part of the CLR and provides .Net programmers a great way of managing errors. In addition to CLR exception system, ASP.Net also provides ways of handling errors.
  • Writing a Single Event Handler for Multiple ControlsJul 22, 2002. Writing a Single Event Handler for Multiple Controls by Giuseppe Russo. Jul 22, 2002. I have noticed that in many articles, I read, people use a longer method of clearing many textboxes, as well as handling more than one control at the same time.
  • Validation Server Controls in Web FormsAug 05, 2002. When working with Web applications, developers need to write two separate codes using Java Script and VB Script to validate user inputs.In this article we are going to see, how we can reduce the programmers effort on coding, reducing the execution process time and simplify the code handling and less number of lines in the coding.
  • Using Installer Classes to Ease Deployment in VS.NETAug 07, 2002. In this article I will demonstrate how to incorporate installer classes with your Visual Studio .NET msi's to handle any supporting tasks that your assemblies may need.
  • Using DTS from C#Sep 16, 2002. In this article I will concentrate on enumerating, executing and changing properties or global variables of DTS package.
  • Drawing Shapes using ThreadingOct 25, 2002. This is simple multi-threading program that draws circles and rectangles. Each shape is handle by individual thread that created every time you press start button. Using sleep method on each thread we can change the speed of each shape.
  • Viewing and Writing XML Data using ADO.NET DataSetsNov 01, 2002. Based on a real world project this article shows how to handle XML data in .NET using C# DataSets and DataViews.
  • Client Server Multithreaded ApplicationNov 08, 2002. This is simple Client/Server (multi-threading) program that transfers data. Server can handle multiple clients.
  • Synchronized Threading in .NETDec 11, 2002. Threads are a powerful abstraction for allowing parallelized operations: graphical updates can happen while another thread is performing computations, two threads can handle two simultaneous network requests from a single process, and the list goes on. Since threads are pretty simple to understand, conceptually, but, practically, they are a cause for programmatic headaches, I decided to write this program to describe how to make use of threads.
  • Lengthy Operations on Single Thread in .NET ApplicationsJul 08, 2003. In this article I discuss how the lenghty operations can be handled in a .NET application. I also discuss how the stack trace can be examined to find any specific methods.
  • Creating ASP.NET Controls DynamicallyJul 10, 2003. This article shows you how create ASP.NET controls dynamically and fill data from a database.
  • Handling Null Values in DataGridJul 17, 2003. This article shows you how to handle no data found or null values in an ASP.NET DataGrid control.
  • Custom Exceptions using Microsoft Exception Management Application BlockSep 02, 2003. This article shows you how to use Microsoft Exception Management Application Block to write custom exceptions.
  • Storing Data in C#Sep 17, 2003. In this article, we will talk about C# data types and how data storage works with different types of data types.
  • Hello World in different StylesJan 09, 2004. I've attempted to write the traditional 'Hello World' in different styles. This explores the different possibilities of addressing a problem - 'Hello World' with different features of C# language and .NET framework.
  • State Management in Web FormsFeb 18, 2004. This white paper discusses the ways in which the state management can be handled in web forms. State management can be done either on client side or server side as explained below.
  • Oracle Data Provider for .NET : Part VIFeb 20, 2004. Oracle Data Provider for .NET (ODP.NET) is an implementation of a data provider for the Oracle database. ODP.NET uses Oracle native APIs to offer fast and reliable access to Oracle data and features from any .NET application.
  • Multilingual Applications in .NETMar 24, 2004. This article explains the basic understanding on different methods of developing multilingual applications in .NET. Here emphasis is given on handling multiple languages using resource files.
  • How to Export Crystal Report in ASP.NETMay 06, 2004. When using Crystal Reports in ASP.NET, the CrystalReportViewer control does not have the export or the print buttons like the one in Windows Form. We can still achieve some degree of export and print functionality by writing our own code to handle exporting.
  • Using Tablet PC Ink on Windows ControlsJun 23, 2004. You can use any control as a surface for the ink and can write on these controls using a Tablet PC pen. To make a control ink enabled, you must have to assign the handle of the control to InkOverlay handle.
  • Getting Started With Exception Handling in C#Jul 14, 2004. This article explores exception handling mechanisms in C#, including an explanation of exceptions and why we need to catch exceptions.
  • Handling Oracle Max Open Cursor Error when Fetching Multiple Rows in ADO.NETAug 18, 2004. When working with Microsoft technologies, MS SQL Server comes out as a natural choice for the database. While it is a fact that .NET Framework has extensive support for SQL server, when you work with other databases like Oracle the situation might turn out to be a little more tricky than it is with SQL Server.
  • Logging Errors in a XML FileAug 26, 2004. Error handling and logging errors at a common place is something, which is required in every piece of code you write. The attached source code is an error logger class that I've used in all of my applications. This class writes errors to XML files.
  • Difference between passing reference types by ref and by valueSep 02, 2004. We all know the difference between passing value types byval and byref, if the variable is passed byval any change to the variable value in the called function is not reflected back in the callee.
  • Handling the Queuing of Messages in a Multithreaded ProgramSep 06, 2004. In the financial world you have to deal with messages being spewed at you in large quantities at a rapid rate. For example stock quotes, market data, and orders come flying at you through some sort of wire and you as a programmer have to handle them in a way that doesn’t overwhelm you or the machine.
  • CopySchema - Part 2Oct 05, 2004. CopySchema is a utility for copying all the data from one Oracle schema to another. Although similar to the exp/imp and bulk load utilities of Oracle, it has the advantage of offering a simple GUI interface and of handling changes to the schema.
  • CopySchemaOct 05, 2004. CopySchema is a utility for copying all the data from one Oracle schema to another. Although similar to the exp/imp and bulk load utilities of Oracle, it has the advantage of offering a simple GUI interface and of handling changes to the schema.
  • Coloring the Console in C# Oct 25, 2004. When working with console applications in C#, you always see a black and white screen. What if we want to change the background color of the console? We can change the foreground and background color of our console application by using win32 API SetConsoleTextAttribute().
  • Will swap work if C# Manipulates Objects by Reference?Feb 15, 2005. C# does manipulate objects by reference, and all object variables are references. On the other hand, C# does not pass method arguments by reference; it passes them by value. Thus, a regular swap method will not work!
  • Out and Ref Parameters in C#Feb 27, 2005. The out and the ref parameters are used to return values in the same variables that you pass an an argument of a method.
  • Best Practices of Exception ManagementMar 08, 2005. Exception management is one of the key area for all kinds of application development .You should adopt an appropriate strategy for exception management to build high quality and robust application .It is a very powerful concept and makes the development work very easy if its used efficiently.
  • Custom Exception Handling in C#May 17, 2005. This article discusses the implementation of Custom Exception Handling using the existing features of C# .Net.
  • Custom Error Handling Using ASP.NETJul 07, 2005. Sometimes in your application, you may want to show some decent error messages other than red error messages and some message when page is not found or server is busy. We will see custom error message handling mechanism in this article using ASP.NET.
  • Swimming with the Sharks : How to Handle Recruiters when Seeking a .NET PositionJul 21, 2005. This article describes how to deal with recruiters in Manhattan, and gives some tips on negotiating for rates and salaries.
  • How do I Implement Custom Event Handling in C#Oct 27, 2005. In this article, we are going to show, how we can call custom event on our designed conditions.
  • Navigating Data Grid using Client ScriptingNov 10, 2005. It's very common practice to use the Data Grid to present data over web pages. Though the Data Grid is provides the richer UI presentation if not coded and handled effectively it can have great performance issues. This article gives the code sample for navigating the data grid using the Client Scripting (thereby can be used for lots of validation before doing the Post Back to the server) and minimizing the round trip to server
  • Better Exception Handling in Visual Studio 2005Nov 16, 2005. With many new cool features, components, controls, and tools, Visual Studio 2005 definitively is a winner. In this article, I discuss the new exception handling dialog in Visual Studio 2005.
  • Learning Delegates in C#, an IntroductionJan 03, 2006. There is this thing in C# called a delegate, which is going to be crucial to build interactions between our objects. What’s a delegate, you ask? Good question. A delegate is a pointer to a method. What’s that mean? Just like you can pass variable by reference, you can pass a reference to a method. Let me give you an example.
  • Types of VariablesJan 14, 2006. In this article we'll cover the behaviors of variables to Reference Types.
  • C# Heap(ing) Vs Stack(ing) in .NET: Part IIIJan 15, 2006. Having a basic understanding of how memory management works will help explain the behavior of the variables we work with in every program we write. In this article we’ll cover an issue that arises from having reference variables in the heap and how to fix it using ICloneable.
  • C# Heap(ing) Vs Stack(ing) in .NET: Part IIJan 15, 2006. Having a basic understanding of how memory management works will help explain the behavior of the variables we work with in every program we write. In this article I'll cover some of the behaviors we need to be aware of when passing parameters to methods.
  • Understanding C# Events: What They Are and Where They Came FromJan 30, 2006. To help you get a working knowledge of C# events and event handling, this article explains where events come from, what they really are at a functional level and how they are expressed in C#. This article specifically looks at the Gang Of Four (GOF) Observer pattern.
  • C# Heap(ing) Vs Stack(ing) in .NET: Part IVJan 30, 2006. Having a basic understanding of how memory management works will help explain the behavior of the variables we work with in every program we write. In this article we’ll look further into Garbage Collection (GC) and some ways to keep our applications running efficiently by using static class members.
  • Auditing and Logging ExceptionsFeb 01, 2006. This article shows how to handle a SQL Server error condition by using the SQL Server .NET Framework data provider.
  • Exception ManagementFeb 02, 2006. Correct exception handling in your Web pages prevents sensitive exception details from being revealed to the user. The following recommendations apply to ASP.NET Web pages and controls.
  • File uploader in C#Feb 13, 2006. This article shows a simple Web user control for uploading any file up to 2 MB to the specified folder using C#.
  • Customized Exception Handling Using Resource FileMar 03, 2006. A good exception handling should care about user as well as developer. i.e. developer can easily locate the exception entry point, may be a function or any where in a vast project, and fix it as soon as possible. So in this writing I tried some exception handlings which will consider both user and developer.
  • Using static variable and Activated Event for Building "Home" Button of Windows applicationApr 10, 2006. In this tutorial I will share experience how , just with the help of a few clicks and a few lines of code , to build a windows application with "Home" button, that allows to return to "Home" form (in fact to close all opened forms by one click) . The examples are written using C#.
  • OnChanged Event for User ControlsMay 09, 2006. In this article I will show some ways how to create user controls with OnChanged event . The examples are written using C# for Windows applications.
  • Server.Transfer : Passing Values from One Page to Another PageJun 19, 2006. Some times, we want to pass values from one page to another page. There are many ways by which we can do this like: by using query string, or session variable, or Server.Transer etc. This article shows you, how to pass values from one page to another page by using Server.Transfer method.
  • Handling new line and carriage return with TextboxAug 08, 2006. This article shows how to handle newline and carriage return with Textbox while working with Databases.
  • Using Delegates to Communication Between Windows FormsSep 04, 2006. Delegates are one of the wonderful features of .Net Framework. Their primary use is focused on support event handling and callback mechanism. In this article we will explore how to use delegate as callback support to make simple communication between deferent opened windows forms
  • Working of Reference Type and Value TypeSep 18, 2006. This article shows you all the difference between reference and value type variables.
  • User Confirmation before Deleting Items in ASP.Net 2.0Oct 12, 2006. This article describes how ASP.Net 2.0 allows setting client-side functions for Button controls through the use of the OnClientClick property and additionally, the event can be handled on server-side depending on the user response.
  • Tip related to sub containers and SqlDataSourceDec 06, 2006. This article provides some tips when working With Master page or SqlDataSource insert function In VS 2005.
  • The GOF "Chain of Responsibility" Design PatternJan 18, 2007. The Chain of Responsibility pattern is used to pass responsibility for handling a call to another class. This article gives a basic overview of the pattern.
  • ASP.Net 2.0: Export GridView to Excel - Part IIApr 04, 2007. In this version of the article, we will include the handling the Hyperlink columns in the GridView export to Excel and also re-factor our original logic to use more general features of Reflection.
  • Multi-threaded Asynchronous Programming in C#. Async Database Calls. Part III.May 14, 2007. In my last couple articles we looked at basic ways to have long-running i/o bound process be handled by the ThreadPool using the asynchronous programming model. In this article we’ll take a look at coding async calls against SqlServer which really comes in handy in production environments where our database is on another machine.
  • Exception Handling in VB.NETJun 25, 2007. Exception handling is crucial since the robustness of software depends on how effectively a program deals with exceptions.
  • Free Book: C# Programming for BeginnersAug 21, 2007. In this book, you will learn how to write and compile C# programs, understand C# syntaxes, data types, control flow, classes and their members, interfaces, arrays, and exception handling. After completing this book, you should have a clear understanding of the purpose of C# language, it’s usages, and how to write C# programs.
  • XML with C-sharpSep 13, 2007. Through this article you will learn how to handle XML in c#.
  • Best Practices for handling exceptionsSep 18, 2007. This article shall explain some of the best practices when you deal with exceptions.
  • Exception Handling in WCF using Fault ContractJan 03, 2008. This article demonstrates how to get error information from a service to a client using fault contract in WCF.
  • Writing Better Code - Keepin' it ExtensibleFeb 21, 2008. In a previous article I talked about how to keep code cohesive by applying the Single Responsibility Principle. I wanted to explore part of another principle of software engineering that will help our code be extensible and can handle growth and change.
  • F# Tuples and Binding (and more Binding)Mar 26, 2008. Binding in F# is similar to using variables in C# but there are some big differences. This article discusses one of the most used keywords in F# for binding ("let") and how it is different than setting a C# variable. I also cover the tuple F# data structure.
  • Add and handle application settings in the configuration file: Part IIApr 16, 2008. This article tells you how to add connection string using the configuration file itself.

About Variable-Handling

NA

SPONSORED BY

C# Corner Chandigarh DevCon16
Chandigarh DevCon16 is a one-day Developer Conference where programmers, technologists, authors, and members meet, demonstrate, plan, and hang out.
techbash 2016