C# Corner

Resources  
  • Read Microsoft Access Database in C#Jan 01, 2000. How to connect and read data from a Microsoft Access (.mdb) database using ADO.NET and C#.
  • Shuffle Game for BeginnersJan 05, 2000. This code sample is a GDI+ shuffle game aimed for beginners. Attached zip file includes the exe and the Shuffle.cs file.
  • Asynchronous Request in .NET (C#)Jan 09, 2000. This code sample shows how to call a COM component in .NET framework using C#.
  • Symmetric Encryptor Beta1Jan 11, 2000. Free to use Encrypt/Decrypt using 2 Symmetric Algorithms 'DES' and 'RC2' coded in C#.
  • Use C# to write comments and documentationJan 12, 2000. Comments and Documentation is one of the most hated tasks by programmers. By using C# programmers can can automatically builds the documentation and comments in the code. This documentation is a XML file which is more or less self explanatory.
  • I'm having trouble implementing IObjectSafety. IE keeps telling me that my controls isn't safe. Why?Aug 15, 2000. This article explains about how to implement the IObjectSafety. ATL's IObjectSafetyImpl class appears to have a few bugs in it. The code below works great.
  • C# EditorsOct 06, 2000. You can write your C# code with various editors including your favorite text editor Notepad. See more editors here.
  • A Simple Calculator ClassNov 28, 2000. Code sample shows how to create a simple calculator class and call it from Main C# program.
  • Write data to an access database using SQL Query and ADO.NETDec 06, 2000. See how to use SQL Statements to write data to an access database.
  • Browse or Open a FileDec 15, 2000. This sample code show you how to use OpenFileDialog class to open or browse a file.
  • Adding Menu Support to a Windows FormDec 18, 2000. This sample code shows you how to use the MainMenu and MenuItem classes to add a menu and click handler for a Windows Form.
  • Calling a COM Component From C# (Late Binding)Jan 08, 2001. This code sample shows how to call a COM component in .NET framework using C#.
  • A Database Access Class with Overloaded SELECT StatementsJan 24, 2001. A useful database access class with overloaded SELECT and other statements.
  • Database Explorer-IVJan 25, 2001. This is version IV of the Database Explorer, which include the support for Access Database with SQL Server.
  • Developing 3-Tier Applications in C# and .NETFeb 04, 2001. The attached sample code explains for beginners, how to Code for a 3-Tier Architecture.
  • Web ProxyServer in C# and VBFeb 06, 2001. Web Proxy Server is HTTP proxy server written in C#.It is Multithreaded so many clients can access the web through this WebProxy Server.
  • Synchronization in Multi-threadingFeb 13, 2001. This article with sample code shows synchronization concepts of multithreading ..
  • Adding Items to a ListBoxMar 06, 2001. Sample code shows you how to add items to a list box.
  • Testing .Net Components Using NUnitMar 08, 2001. Write unit tests before starting development". Writing test allows me to see immediate results of every code change.
  • Serialization Sample CodeMar 13, 2001. A class on serialization.
  • Mail Merge Program - Part 2Mar 21, 2001. This is a simple mail merge program (Part 2). This program reads from the access database (by default) from a specified table.
  • Accessing .NET Components from COM Clients and COM components from .NET ClientsMar 26, 2001. In this article I am going to explain how to access a .NET component from a COM client and accessing COM from .NET clients.
  • POP3 AccessMar 29, 2001. This is a follow up to my SMTP example that shows how to access your POP3 server.
  • Writing Secure Code using C#Apr 06, 2001. Code access security is a mechanism that grants/denies access to resources within a method call. For example, code written by a person may be allowed to write to the disk while code from another one may be forbidden from accessing the disk. This control can be enforced even if the code written by both of them is used within a single application
  • Protecting IL Code from unauthorised DisassemblingApr 09, 2001. Microsoft .NET proved a mechanism where the code written in VB.NET, C# or any CLS compliant languages to generate MSIL (Microsoft Intermediate Language)code which targets the CLR and executes. This is an excellent mechanism to abstract the high level code from the underlying hardware.
  • 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.
  • Understanding How Assert Effects SecurityApr 25, 2001. Assert is a security action that is evaluated at run time. Code Access Permission classes and Permission Sets support a method called Assert. Using the Assert method to control access to resources or actions will allow your code to perform actions that it normally has permission to perform and will allow other callers up stream in the call stack to have access that they would not normally have.
  • XML Strengths and Weaknesses with DOM, ASP, and XSLApr 30, 2001. In this article we're going to take a look at some of the terminology that comes with using XML and its related technologies, as well as how to create and transform XML documents with XSL using Microsoft's MSXML parser. To test the code samples shown in this article you should be running Windows NT/2000/XP with IIS installed. You should also have SQL server 2000 installed on the same machine.
  • Defining Custom Entry PointsApr 30, 2001. In this article i am going to demonstrate how we can manipulate the IL code to change the behaviour of how the .NET programme executes.
  • Viewing Assembly PermissionsMay 02, 2001. In this article I will show you how you can view the Code Groups that an assembly belongs to and what permissions belong to the assembly. I will demonstrate the Caspol utility supplied with the .NET SDK.
  • Connect to an Oracle DatabaseMay 03, 2001. This sample code shows you how to connect to an Oracle database using C#.
  • Working with Relational Data in ADO.NETMay 03, 2001. Working with hierarchal data was not that easy with the previous version of ADO.
  • Operator Overloading ExampleMay 14, 2001. The code uses the feature of Operator Overloading in C#. It shows how different operators are overloaded and can be used in a easy manner.
  • 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.
  • Data Structure Sample ExampleJun 04, 2001. Source code for Data Structure implemetation of Stack, Queue, Doubly linked list and more..
  • .NET Brings The Fun Back to ProgrammingJul 11, 2001. Today, we are all comfortable sitting in front of our high powered computers running graphical user interfaces and compiling code in sophisticated development environments.
  • XML as Middle TierJul 12, 2001. There is always been a need that there will be an intelligent middle Layer between Database Server and the UI Code. There are many ways but one fantastic approach came in picture with the XML.
  • Scaling an ImageJul 13, 2001. This code will show You on way to scale an image with .Net Beta 2.
  • Mobile with Access DatabaseJul 14, 2001. Till now we had done the Programming using SQL Server and XML as Database.
  • Using/Debug Option During CompilationJul 15, 2001. This source code below is an an example of how to use /debug option during compilation.
  • Compute Feature of DataTableAug 01, 2001. The following code is for implementing least known feature of DataTable Compute() method.
  • CDataService: A Generic Database Access ClassAug 09, 2001. Using a generic database access component in data-aware applications can simply development and separate data tier from business tier.
  • Message Box BuilderAug 14, 2001. This program will help you using MessageBox Class. Program generates code from what you choose.
  • Namespaces in C#Aug 20, 2001. Namespaces allow you to create a system to organize your code. A good way to organize your namespaces is via a hierarchical system.
  • Messaging between Threads using Message LoopAug 20, 2001. MessageLoopLib is a stripped down version of a complete, threading communication subsystem Ive written. This implementation is a single thread created in the GUI constructor. Ive dropped all thread management and have had to change some of the message code to accommodate this.
  • Basic Database operations using ADO.NETAug 21, 2001. I found very interesting database features incorporated into the .NET as ADO.NET.
  • C# or VB.NET - World War IIIAug 23, 2001. In this article I'm going to go under the hood and show you what really happens to the in C# and VB.NET.
  • Active Directory Sample IAug 23, 2001. This sample shows how to access Active Directory information in a Windows 2000 domain.
  • Web Services between .NET, Java and MS SOAP Toolkit: Part IAug 24, 2001. WinGhost 2.0 application allows you to show and hide applications running on your machine. I find this program useful at my work as I do lot of programming at any given time I can have a bunch windows open. I use it normally to hide just my windows I don't access that often.
  • WhoIs Sample CodeAug 27, 2001. Sample example shows you how to implement WhoIs...
  • An insight into Code Reusability and COM Interoperability : Part IAug 28, 2001. Code reusability is the art of using existing code to achieve better productivity and ease of maintenance. The concept of reusability is not new. Its existence has been evident since the evolution of mankind.
  • File Info on Mobile Aug 30, 2001. Here is an example of Accessing the Information in a File to be given to Mobile User.
  • Simple Windows Forms Events and InterfacesSep 03, 2001. This article contains a c# code which makes use of the concepts of Events and Interfaces together.
  • Simple Game Developed in C#Sep 03, 2001. This article contains the code for a simple game developed using csharp. This game is all about arranging the shuffled numbers in ascending order.
  • Socket Programming in C#Sep 03, 2001. This program is useful for a starter who wants to write C# code using .Net Sockets.
  • Web Control BuliderSep 03, 2001. The attached C# program can be used by users who dont have VS.NET IDE to generate the code for WebControls.
  • Regular Expressions Usage in C#Sep 07, 2001. The source code shows how to use Regular Expressions in C#.
  • A variety of Chart EnginesSep 07, 2001. The original code came from Scott Guthrie‚Äôs chart engine example. The differences from original code.
  • Operator Overloading in C#Sep 10, 2001. The Source code below shows how to use Operator Overloading in C#. Operator Overloading is pretty useful concept derived from C++ by C#.
  • Mouse and Key EventsSep 11, 2001. This article explains the usage of key and mouse events. The following code shows you how you can read mouse position on mouse move.
  • Doppler RadarSep 14, 2001. This is an app that will display the current doppler radar picture for any given zip code.
  • Using Attributes in C#Sep 14, 2001. This article shows how to create custom attribute classes, use them in code, and query them.
  • 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.
  • Constructor, Destructor and ILASMSep 20, 2001. I find C# a very interesting language and it also comes handy to analyze ILASM code.
  • Accessing Oracle DatabaseSep 21, 2001. This source code shows you how to connect to an oracle database and do operations such as select, insert, update and delete.
  • Checked ListBox Control In C#Oct 18, 2001. The following source code will provide the use of CheckedListBox Control In C#.
  • MDI Forms in C#Oct 18, 2001. This article show how to create the MDI Form. The following source code will provide the use of MDI Forms in C#.
  • Using TreeView ControlOct 23, 2001. The following code will enumerate the Folder/Drives in the TreeView Control.
  • 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.
  • Inheritance and PolymorphismOct 29, 2001. By using the concept of inheritance, it is possible to create a new class from an existing one and add new features to it.
  • 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.
  • An insight into Code Reusability and COM Interoperability - Part 2Nov 26, 2001. We have mushrooms of network systems running across the globe based on many proprietary protocols. In order to integrate these systems to communicate with each other in a more meaningful way, developers or organizations have to face an uphill task.
  • Creating a Custom Data AdapterDec 03, 2001. A good programmer needs to know how to work with ADO.NET DataAdapters at the code level.
  • Using ProgressBar, StatusBar and Timer Controls in VS.NETDec 05, 2001. This source code shows how to use the Timer, ProgressBar and StatusBar Windows Forms controls.
  • Debug Troelsen's .NET books (1): IEnumeratorDec 10, 2001. This article examines code problem in chapter 4 (for C#)/chapter 5(for VB.Net) of the two .Net books.
  • Using ADO RecordSet in ADO.NETDec 10, 2001. Using ADO recordset in managed code using ADO.NET data providers is pretty simple. Visual studio .NET provides you to add reference to the COM libraries. In this article I'll show you how to access data using ADO recordset and fill a ADO.NET data provider from the recordset data.
  • C# and ActiveX DLLDec 14, 2001. As you know with Visual Basic 6.0, it is possible develop a COM server and implement them in a Visual Basic client program. But this is being done by using Visual Basic. You may wonder about the idea of calling this DLL in a C# Application. Well, C# language provides us a way to call this COM server in a program. When we compile a C# program an Intermediate Language is generated and it is called as Managed Code.
  • How Can You Migrate your Existing Applications?Dec 20, 2001. When a new technology emerges, companies and developers begin to wait anxiously for answers to their questions.
  • Space Invaders in C# and .NETDec 23, 2001. Yes, the classic arcade game has returned and is appearing in C# Corner complete with sound and authentic aliens and source code. It's not quite as good as the real game, but with a few adjustments it can get there.
  • Creating Exploded Pie Chart Having Click Through Functionality in C#Dec 26, 2001. In this article I would like to show you code that would create exploded pie chart and implementing click through functionality to that chart.
  • A Quiz Application using Windows FormDec 27, 2001. This code shows you how to validate data in windows forms, add or remove panel control, and write a form based quiz application.
  • 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++.
  • Buliding Text to Speech Applications using SAPI 5.1 and C#Jan 03, 2002. In this article,The Speech application programming interface (SAPI) considerably decreases the code necessary for an application to use speech recognition and text-to-speech, making speech technology more handy and robust for broad range of applications
  • Basic FTP in C#Jan 10, 2002. FTP client developed using Windows Forms. The source code uses a rigid Model-View-Controller design pattern.
  • 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.
  • Data Access through Web Services, Stored Procedures and SQL QueriesFeb 12, 2002. Web Services has been the most revolutionary aspect of the .NET framework developed by Microsoft. This article presents the three different modes through which data can be accessed viz. through Web services, stored procedures and SQL query using the power of ADO.NET and XML.
  • C#RIS : Tetris Game in C#Feb 14, 2002. I have written a Tetris clone that demonstrates how to use off-screen graphics buffering for smooth animation and utilizes a multi-dimensional array approach to designing a game grid. The classes are largely self-explanatory and the techniques are documented in code well enough to explain what is going on.
  • N-Tier Development with Microsoft .NET : Part IFeb 15, 2002. The purpose of this article is to examine a proof of concept on an architecture that follows the DNA pattern on concept only.
  • xBase Engine for C# and VB.NETFeb 25, 2002. This library is written to handle DBF files from C# or VB.NET applications.
  • Sorting Object Using IComparer and IComparable Interfaces Mar 01, 2002. The System.Collections namespace contains interfaces and classes that define various...
  • Saving and Restoring Location, Size, and Window State of a FormMar 01, 2002. This article presents a simple C# class that may be added to a form to automatically do this. When I designed this class I wanted to be able to add it to a form using the least amount of code and also be able to add it to a form from the toolbox.
  • Authenticate Web Service Client - An ASP.NET Web ApplicationMar 04, 2002. This client application shows you how to access Authenticate Web service from an ASP.NET Web application.
  • Authenticate Web ServiceMar 04, 2002. In this example we will build a web service that authenticates userid and password from an a very simple MS Access database. This web service exposes only one method to the client.
  • Authenticate Web Service Client - Windows ApplicationMar 04, 2002. This client application shows you how to access Authenticate Web service from a Windows application.
  • Calling Managed Code from Unmanaged CodeMar 11, 2002. One significant part of developers (including myself) are doing some kind of automation of Microsoft Office. So I will concentrate on opposing side of problem, how to use managed assembly from MS Office or VB script. In this article, I will discuss how to call managed code from unmanaged code.
  • JIT CodingMar 11, 2002. One not so well known feature of .NET platform is possibility to invoke compiler and practically create code and assembly from running instance of application. It is possible to do that in two ways. First one is a bit simpler and involves namespaces System.CodeDom and System.CodeDom.Compiler, second one is more efficient and utilizes namespace System.Reflection.Emit. Since there are very few examples about how to use System.CodeDom.Compiler I will start with it.
  • Creating a SQL Server Database Programmatically using SQLDMOMar 12, 2002. The attached source code creates a SQL Server database programmatically using SQLDMO.
  • Drawing rubber-band lines and shapesMar 12, 2002. I would like to show how we can draw rubber-band lines and shapes in GDI+ with just a few lines of code.
  • Sending Windows Message in C#Mar 14, 2002. This sample code shows how to send Window messages between two forms using C#.
  • C# to VB.NET Code Conversion Web ServiceMar 20, 2002. ConvertCSharp2VB is a Web Service that converts a C# code block into VB.Net. It exposes the Service Description and WSDL for the Web Service, so you can implement this functionality in your applications.

About Code-access-security

NA

SPONSORED BY

Custom Software Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.
European SharePoint Conference