C# Corner

Resources  
  • Creating a Class and Call it from Main ProgramSep 30, 2000. This article explains how to create your class, add some functions and call it from Main function.
  • A Simple Calculator ClassNov 28, 2000. Code sample shows how to create a simple calculator class and call it from Main C# program.
  • CSDownloadURL : Download Contents of a Web PageDec 03, 2000. CSDownloadURL is a class which has two functions - SetURL and DownloadURL. The set URL sets the current URL and GetDownload downloads the URL contents and returns its contents in a string.
  • Implementing Delegates in C# : Part 2Feb 13, 2001. This is second part of Timothy's Delegates in C# series...
  • Using Delegates to Choose Right FunctionApr 01, 2001. The need to call different class method based on some string passed to class is an old problem.
  • Mobile Fun with XMLMay 24, 2001. Here is something really wonderful in Mobile field .This example is for authenticating the Mobile Users against his settings stored in XML file. This is really good where all the ease of XML is applied. Function open the XML file and particular node data validate it against user inputs and do the specified.
  • Events and DelegatesJul 26, 2001. Events in C# are based on delegates, the Originator defining one or more callback functions as delegates and the listening object then implements then.
  • strnicmp equivalent in C#Aug 07, 2001. C# equivalent strnicmp function in C language. It accepts two input strings along with the number of positions of chars to compare.
  • Super String in C#Aug 20, 2001. Today I realized that I miss those Visual Basic/Visual C++ type operators. You know the ones: Left, Mid, Right.
  • Passing Const Parameter to Functions in C#/C++/VB ComparedAug 30, 2001. Parameter passing to a function is extremely important in all programming languages. The desire to keep the passed parameter intact forced the compiler designers to add various keywords to the programming languages.
  • String Jargon in C#Sep 05, 2001. The following article shows some String functions which are not currently available directly in C#.
  • Playing with StringsSep 18, 2001. This program explores the String class and its various methods. With this you will be able to initialize strings using different constructors and use them. To see how the methods of the 'String' class work, see the following code.
  • WinChat For .NETOct 10, 2001. WinChat For .NET is a simple peer-to-peer chatting program that functions very similarly to the WinChat program provided by Windows 2000. It provides all the functionalities that the original WinChat program provides.
  • Encapsulation in C#Oct 12, 2001. In Object Oriented programming Encapsulation is the first pace. Encapsulation is the procedure of covering up of data and functions into a single unit (called class).
  • C# PagerOct 16, 2001. C# Pager is a simple client/server application that implements functions of a pager.
  • Exploring delegates in C#Oct 30, 2001. Delegates are a kind of type safe function pointers which are actually declared as class derived from System.MulticastDelegate.
  • Simple Sniffer in C#Dec 03, 2001. This program shows you how to retrieve data from a packet using Sockets.
  • Tutorial: Capturing and Running IE Instances in a Windows controlMar 15, 2002. In this article we are going to study how to find the running instances of Internet Explorer on your machine.
  • Function Overriding and Its Impact During Object InitializationMar 25, 2002. Different languages have different ways to initialize an object. C# and Java both have almost similar ways to initialize an object with few subtle differences.
  • Xite EncryptionMar 25, 2002. This class contains methods/functions for easily decrypting and encrypting data.
  • Real-time Message Logging Utility - Part 1Apr 01, 2002. A message logger is a utility that helps in logging the messages thrown from functions/programs. It is useful in critical applications as it helps to know the time taken by a function to execute, the time that the function remained idle and any messages that the function wants to be logged for further analysis.
  • .NET COM Interoperability - Part 1: Using COM Components from .NET FrameworkApr 02, 2002. The DotNet framework exposes COM objects through a proxy called the runtime callable wrapper (RCW). The primary function of RCW is to marshal call between a managed client (.Net) and unmanaged COM object. The runtime maintains a single RCW for each COM object.
  • Multithreading Part 4: The ThreadPool, Timer Classes and Asynchronous ProgrammingApr 16, 2002. In this article, I would discuss few more .NET classes and how and what role do they play a role in building multithreading applications.
  • Expression EvaluatorApr 30, 2002. This program uses the transformation from infix notation to postfix notation to evaluate most of the mathematical expressions.
  • Shell Commands within C#Jul 10, 2002. In this article we will examine a few examples for executing shell commands outside of our program using C#.
  • Double Buffer Drawing with DirectDraw: Part1Aug 15, 2002. Because we will be primary focusing on 2D game programming in the first articles, we will use the DirectX7 API which is perfect for its DirectDraw class and simplicity. Don’t worry for not having the right DLL because DirectX8 has full backward compatibility to DirectX7 and the COM object should already be available on your computer if you have DirectX 8 installed.
  • Platform Invoke Sample - Changing the Desktop WallpaperSep 27, 2002. In this example we will see how to change the Desktop wallpaper by invoking a Windows API function from C#. The Platform Invoke mechanism allows you to access unmanaged functions implemented in dlls.
  • Platform Invocation Services in .NET FrameworkOct 25, 2002. This article will cover the details of Platform Invocation Services provided in .Net Framework. Platform Invoke Services acts as a bridge between the managed and unmanaged code. This service enables managed code to call unmanaged functions which are being exposed by any dynamic link libraries (DLL’s) such as Win32 API’s or any custom DLLs.
  • Function to Change a Block of Text to Title CaseNov 20, 2002. Function to change a block of text to Title Case.
  • DigitizeAny - A .NET Windows Digitization ToolDec 17, 2002. DigitizeAny uses Win32 API calls to obtain the coordinates of the cursor and then translates to the graph coordinates once set. Since a mouse click would essentially bring to focus the window where it is pointed to, this tool uses the key event to capture the coordinates of the cursor.
  • Invoking Unmanaged DLL Functions from Compact Framework for Pocket PC Jan 04, 2003. In this example we will use the Compact Framework to create a program containing a launch pad for the Pocket PC.
  • Using Stored Procedures in Conjuction with DataAdapterJan 09, 2003. A stored procedure is a named collection of SQL statements that are stored in the database. To the client a stored procedure acts similar to a function.
  • Telnet Scripting in C#Jan 28, 2003. This library, written in C#, expands on some telnet code from various other sources, presenting the caller with a number of functions handy for scripting telnet sessions (i.e. SendMessage, SendAndWait, WaitAndSend, WaitFor).
  • Remote Objects: Part IMar 12, 2003. This demo shows how to create the remote objects with callback functions and use them in the window host.
  • Remote Objects:Part IMar 12, 2003. This demo shows how to create the remote objects with callback functions and use them in the window host.
  • Part I: Simple Color Syntax Code Editor for PHP written in C# and .NETJun 18, 2003. The Application is a simple Windows Form program that allows you to open and save the text files edited in the rich edit control, as well as print them out. The program takes advantage of a “syntax” text file for PHP which lists the functions and keywords contained in the PHP language.
  • Check Internet ConnectionAug 25, 2003. How to check if your computer is connected to the internet with C#. It's much more easier that other tutorials I've seen in other sites.
  • Using Genetic Algorithms to Generate Evolutionary Art in C# and .NETOct 10, 2003. In this article we will experiment a bit with genetic algorithms and creating fitness functions that produce art on a Windows Form.
  • Real Life SQL and .NET: Part VIJan 13, 2004. Welcome to the world of SQL and the huge, growing database technologies of today’s business all over the SQL world. By reading this article, we have begun accepting the knowledge that will soon be required for survival in today’s world of relational database and data management. Alas, for the reason that it is first necessary to provide a background of SQL and cover some preliminary concepts that we need to know, the majority of this article is text in paragraph format.
  • Training and Simulating a Neutral DotNetwork in C# Jan 16, 2004. In this article we will explore a well-known AI algorithm for modeling the training of neural networks called back propagation.
  • Masked TextBox ControlJan 26, 2004. This Masked Edit TextBox intelligent user control enhances the function of TextBox control, which can mask the Date, IP Address, SSN, Phone number, digit, decimal and check the validation, automatically set delimit location.
  • Fundamentals of Function Point Analysis Part IFeb 17, 2004. Function points are a unit measure for software much like an hour is to measuring time, miles are to measuring distance or Celsius is to measuring temperature.
  • Fundamentals of Function Point Analysis Part IIFeb 18, 2004. Function points are a unit measure for software much like an hour is to measuring time, miles are to measuring distance or Celsius is to measuring temperature.
  • Normal Distribution Implementation in C#Apr 13, 2004. The attached source code is a C# normal distribution class. The probability density function (PDF) and cumulative distribution function (CDF) can be computed for a given x-value.
  • Resizable Calculator using C#Apr 22, 2004. This application is a scientific calculator, which is resizable and performs some basic operations like addition, subtraction, multiplication, division and some trigonometric functions.
  • HTML Client for Web Services using DHTML BehaviorMay 23, 2004. In this example we will access a Web Service created in C# from an HTML client.
  • 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.
  • Thread Safe Collections ArrayList and QueueSep 24, 2004. The attached project provides a dll containing a wrapper around the non-thread safe ArrayList and Queue classes. The wrapper implements the most common functions of this collection elements.
  • Bulk Data Transactions using OpenXMLOct 13, 2004. OPENXML is a new function added to SQL Server 2000 that provides a rowset view over an XML document. Since a rowset is simply a set of rows that contain columns of data, OPENXML is the function that allows an XML document to be treated in the familiar relational database format. It allows for the passing of an XML document to a T-SQL stored procedure for updating the data.
  • 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().
  • ClickMania GameDec 21, 2004. This is an old game, first implemented in 1996 or so... It has a great addictive power. You will quickly find out the rules. I used the winmm.dll library for playing sounds, the picturebox.Paint event to draw bitmaps in a Picturebox and a recursive function to check the balls next to each other for the colors.
  • Rotating the text display on a Pocket PC/Win CE deviceFeb 01, 2005. In this article let us try to understand why rotating a text/bitmap is difficult to achieve on a Pocket PC 2003/Win CE 4.2 device.
  • Pocket PC 2003 : Saving the Signature as a BitmapFeb 15, 2005. The System.Drawing.Graphics namespace is commonly used for almost any forms in the desktop framework, hence it has got lots of facilities to draw any kind of image on to the device context.
  • Stack in C#Feb 22, 2005. Stacks are one of the common data structures used in the software world, which follows the First In Last Out paradigm. Stacks are used in various mathematical functions like Towers of Hanoi, finding Fibonacci Sequence , Factorial of a number to name a few.
  • Adding new Windows User Account using Active DirectoryMay 21, 2005. This article uses Active Directory to add new user account. The Active Directory will be accessed using windows native protocol (not LDAP).
  • AI: Population based Incremental Learning in C# and .NETMay 22, 2005. In this article I would like to discuss another offshoot of the genetic algorithm called Population Based Incremental Learning (PBIL).
  • Building Stacks with C#Jun 23, 2005. The following article presents a general definition of the stack data structure and its most common functions. This article explores a sample stack implementation as a .NET class in C#, as well as some interesting usage scenarios.
  • Building Stacks with C#Jun 23, 2005. The following article presents a general definition of the stack data structure and its most common functions. This article explores a sample stack implementation as a .NET class in C#, as well as some interesting usage scenarios.
  • SQLCLR DebuggingAug 09, 2005. In SQL Server 2005, CLR integration allows you to write stored procedures, triggers, user-defined types, and user-defined functions using any .NET Framework language, including Microsoft Visual Basic .NET and Microsoft Visual C#. In this article, I will explain how to debug SQLCLR stored procedure or SQLCLR user-defined function.
  • Understanding Delegates in C#Sep 15, 2005. Delegate is type which holds the method(s) reference in an object. It is also reffered as a type safe function pointers.
  • Delegates and Events in C#Oct 05, 2005. A delegate in C# is similar to a function pointer in C or C++. Using a delegate allows the programmer to encapsulate a reference to a method inside a delegate object.
  • SQLCLR DebuggingNov 10, 2005. In SQL Server 2005, CLR integration allows you to write stored procedures, triggers, user-defined types, and user-defined functions using any .NET Framework language, including Microsoft Visual Basic .NET and Microsoft Visual C#. In this article, I will explain how to debug SQLCLR stored procedure or SQLCLR user-defined function.
  • How to Select all Checkbox when Header Checkbox is SelectedDec 30, 2005. Here I have provided the code using javascript to check/uncheck all checkboxes when header checkbox is checked. I recommend JAVA Script because its executed at client side and saves request Round-Trip time.
  • Select/Deselect all Checkboxes at Server side in ASP.NET using C#Jan 11, 2006. In this article we will see that how to select/deselect all checkboxes using C#.net server side code inspite of simple Javascript code.
  • Usage of doPostBack in a Real EnvironmentJan 29, 2006. Many atricles describes about "__doPostBack". But here I am trying to say some real practical ways to use it and also mentioned some precautions waant to take before use it. Believe me this article derived from my practical experience and will continue only such items from my side, as only those thing will help a developer.
  • AJAX Pager controlFeb 01, 2006. After AJAX Repeater control next logical thing was to try and create paging control, a control which renders paging links when you set its properties like page count and page number, I have been using similar control in asp.net page so I decided to implement same thing with JavaScript.
  • Debugging Windows Services in C# and .NETFeb 06, 2006. The compiled executable file that a service application project creates must be installed on the server before the project can function in a meaningful way. You cannot debug or run a service application by pressing F5 or F11. Here we are going to see how to debug our own windows services.
  • How to Read and Write System Registry Keys using C# (VS.Net 2005)Feb 09, 2006. Most of the time while working with the Enterprise Application will need to store the user preferences inside the windows system registry. In a general term Windows Registry is the database that holds all the settings Windows needs to function.
  • Introduction to the MagicAjax.NET - The Magic Ajax Engine for .NETFeb 11, 2006. MagicAjax.NET is a free open-source framework, designed to make it easier and more intuitive for developers to integrate AJAX technology into their web pages, without replacing the ASP.NET controls and/or writing tons of JavaScript code.
  • Playing Sounds in .NET 2.0 Using Sound PlayerFeb 13, 2006. If you have ever played sounds in your applications, you must be familiar with PlaySound() WIN32 function. Prior to .NET 2.0, there was no way to play sounds thorugh the managed API. The SoundPlayer class introduced in .NET 2.0 now allows developers to play sounds using managed API.
  • Counting Words in C#Feb 14, 2006. This article shows a function that returns number of words rather than number of characters.
  • AJAX Repeater control Feb 19, 2006. AJAX has been in shadows for a decade now but it started buzzing right after the launch of the Google Earth. This article shows how to create an AJAX Repeater control with item, header, footer, alternative item, and seperator item templates using AJAX and ASP.NET.
  • 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.
  • Client Side Validation with JavaScript in ASP.NETMar 22, 2006. This simple program will guide how to do client side validation in JavaScript.
  • How to Automatically Send a Resolution Optimized Markup of a Web Page to the ClientApr 15, 2006. This article will tell you about a technique through which you can make intelligent ASP.NET websites which will automatically detect the resolution of the visitor's desktop and generate a resolution optimized mark-up of a page, not forcing the visitor to keep the resolution of his/her desktop according to the website's best view resolution.
  • Fuligginedialogs in C#May 09, 2006. In this article the author explained how we can expand feature of the framework for an immediate use of MessageBox.Show(); function.
  • AJAX DataGrid: An ASP.NET User ControlMay 16, 2006. This DataGrid is a Client Side Control. It is created by JavaScript and uses Ajax.net technology.
  • Debug Client Side Script in Visual Studio 2005May 18, 2006. This article is for web developers, because it's target is one of the new feature in Visual Studio 2005 which is debug client side script.
  • Using the System Function fn_listextendedproperty of SQL Server 2005 for .NET Applications: Part IIMay 22, 2006. In this article, divided into two parts, I will compare the system function fn_listextendedproperty of SQL Server 2005 with the similar function of SQL Server 2000 ( Part 1 ), describe using the function for .NET applications ( Part 2 ). The examples are written using Transact-SQL and C#.
  • Using the System Function fn_listextendedproperty of SQL Server 2005 for .NET Applications: Part IIMay 24, 2006. In this article, divided into two parts, I will compare the system function fn_listextendedproperty of SQL Server 2005 with the similar function of SQL Server 2000, describe using the function for .NET applications. The examples are written using Transact-SQL and C#.
  • AJAX Document Management - AJAX Document ViewerJun 16, 2006. AJAX (Asynchronous JavaScript and XML), is a web development technique for creating interactive web applications. The intention of AJAX is to exchange small pieces of data with the server without the necessity of reloading the entire web page.
  • System components performance in ASP.NET using C#Jul 01, 2006. This article shows how to retrieve system properties in a webpage on just singleclick of mouse.
  • System Views and Functions in SQL Server 2005 by Steve on Jul 06, 2006 Jul 06, 2006. I tried to explore some basic TSQL functions and VIEWS in SQL Server 2005. I believe this would be useful when we write DDL-DML Statements.
  • Calling the Server-Side method asynchronously from Client ScriptJul 19, 2006. This article describes how to call the server-side method asynchronously from JavaScript with the use of Client Callbacks that is built in ASP.NET 2 so that the client browser receives the data dynamically without page postback.
  • Outlook Style Menu with Collapsable Side MenuAug 25, 2006. This article shows very good outlook style menu with collapsable side menu.
  • Infragistics UltraWebNavigator Context Menu Integration with JavascriptSep 13, 2006. This article shows one of the difficult functionality of adding context Menu on Infragistics UltraWebGrid, in conjunction with mouse right click.
  • 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.
  • Using Client Callbacks for Building the ListBoxesFTs_C ASP.NET Web User Control: Part INov 23, 2006. In this article I share how you can build your own ASP.NET web user control with the help of the Client Callbacks. The examples are written using C# and JavaScript.
  • Using Client Callbacks for Building the ListBoxesFTs_C ASP.NET Web User Control: Part IINov 27, 2006. In this article I share how you can build your own ASP.NET web user control with the help of the Client Callbacks. The examples are written using C# and JavaScript.
  • Using Genetic Algorithms to Determine Calculus Derivative Functions in C# and.NETNov 28, 2006. This article describes how you can use genetic algorithms in .NET to determine derivatives of mathematical functions. The program uses an algorithm called Multiple Expression Programming (MEP) inside the genomes to exercise a function tree.
  • 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.
  • Extending the ASP.NET ImageButton ControlDec 18, 2006. This article describes an easy approach to extending an existing ASP.NET control; in this example, the standard toolkit’s Image Button control is extended to support roll-over effects. Given the standard control already contains existing support for both server side click events and client click events, the control is well furbished prior to the addition of the roll-over effect.
  • Refreshing a parent page from a child in ASP.NET 2.0 Jan 19, 2007. I'm going to explain how to refresh a parent page from a child page using the new API of ASP.NET 2.0 and JavaScript language.
  • Just for Fun - A Small Piano KeyboardFeb 02, 2007. This one was just for fun; the article describes a project used to build a simple piano keyboard that plays some not too terrific sounding notes courtesy of the Kernel32.dll's beep function.
  • Writing Managed User Defined Function using C#Feb 22, 2007. This article is trying to explain the simple and required steps that are require starting the creation of Manage User Defined Functions using C#.
  • Using a COM Callable Wrapper to Launch a Program from a Hyperlink in the WebBrowser ControlMar 02, 2007. This article describes how you can launch an application from a link inside the WebBrowser Control using a combination of javascript and an ActiveX Control created in C#.
  • How to debug clientside Javascript code in VS2005 or VS2003Mar 30, 2007. This article helps you to debug Javascript code on an ASPX page.
  • ASP.Net : AutoListMay 09, 2007. This small web application will demonstrate some useful functionality like AutoList, XML data is land to populate list at client side using xml and xpath query, transform xml data using XSLT at client side etc.
  • Spell check enabled RichTextBox custom controlMay 16, 2007. This article describes a quick and simple approach to applying a spell check function to the rich text box control and bundling both features into a single custom control. Of course there is nothing novel or particularly interesting about performing spell checking upon a selection of text using the Word.DLL.
  • How to Submit Form When User Press Enter Key on DropDownList BoxMay 25, 2007. This small codes written in JavaScript will help you to submit form when user press enter key on dropdownlist.

About JavaScript-functions

NA

SPONSORED BY

Spire.Doc - Free .NET Word API
Use Spire.Doc to create, read, write, print, and convert word documents to OpenXML, RTF, TXT, XPS, EPUB, EMF, HTML, Image and PDF.
Download Free eBooks