C# Corner

Resources  
  • 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.
  • A Database Access Class with Overloaded SELECT StatementsJan 24, 2001. A useful database access class with overloaded SELECT and other statements.
  • Control Statemenats - Part 1Jun 01, 2001. This lesson shows how to use c# control statements, and the difference between these controls in C++/ JAVA and c#. Sample includes single selection, if-else, and multi case ..
  • Control Statements - Part 2Jun 04, 2001. This lesson shows how to use while,do, for, for..each statements.
  • Working with OleDb Data AdaptersJun 20, 2001. This step by step article guides you to create your database applications using OleDb Data Adapters in VS.NET.
  • Difference Using Directive and StatementJul 26, 2001. This article explains difference between using directive and using statement with sample example.
  • 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.
  • 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.
  • Debugging Techniques in C#Dec 04, 2001. Debugging GUI applications for me mostly consists of printing out debug statements in the form of a dialog box with some text.
  • 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++.
  • Create a SQL Server Database dynamically in C#Mar 05, 2002. In this article, I’ll show you how to create a new SQL Server database and its objects such as table, stored procedures, views and add and view data. I’ll also show you how to change database table schema programmatically. You’ll see how SQL statement ALTER TABLE is useful when you need to change a database table schema programmatically.
  • Multi-threaded Web Applications - Case I: Search EngineMar 07, 2002. This article is the first of the series of 4. I will demonstrate the use of threading in web applications by implementing a simply search engine. The following 3 articles in the series will be a Port Scanner, a Reverse DNS and a Web Hammer respectively.
  • Multi-threaded Web Applications - Case II: Port ScannerMar 12, 2002. This article continues the 4-parts series of Multi-threaded Web Applications. In the first part, I have demonstrated how you can use multi-threading with ASP.NET to make a web based search engine more responsive, and to reduce the time required to compose the result. In this article, I will demonstrate how you can apply the same technique to a web based port scanner.
  • Tracking Time in a Window ApplicationApr 15, 2002. The program reads from an XML file to get the data about names and birth dates, so it is easy to add or remove names without changing the code in case my son decides the program should include his pet dog or turtle.
  • Case Study: Demo Networking Financial System May 23, 2002. In this tutorial I will discuss some of the design and development issues that one might consider when using .NET framework for developing Network affiliated applications.
  • Utilizing Assembly Information for Your Automated Splash DialogJun 05, 2002. There are cases when you need to reuse the same splash screen or about box in many applications.
  • A Generic Data Access Component using Factory PatternJul 30, 2002. the article A Generic Data Access Component using Factory Pattern provides a very good way of creating ADO.Net data provider independent applications, but there is one problem with it. Different ADO.Net data providers use different approaches in labeling of parameters in SQL statement.
  • Function to Change a Block of Text to Title CaseNov 20, 2002. Function to change a block of text to Title Case.
  • The "Using" Statement in C#Dec 11, 2002. The .Net Framework provides resource management for managed objects through the garbage collector - You do not have to explicitly allocate and release memory for managed objects.
  • ADO.NET, COBOL and Stored ProcedureDec 13, 2002. A stored procedure is basically a series of SQL statements that reside on the database. The procedure could create a new table, retrieve data from one or more tables, update one or more tables or perform many other tasks.
  • 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.
  • J2EE to .NET Migration: Quick TipsMar 26, 2003. Here are some Quick tips to get you started, in case you need to migrate a J2EE based application to a .NET based application.
  • C# Coding TechniquesSep 05, 2003. I wrote this article for novice programmers who needs to grasp the concepts of "What's C# code?" and "How we can write code?". To read this article you must have an overview of the .NET Framework and Visual Studio.NET (VS. NET).
  • Object Oriented: The Grownup Way to CodeSep 29, 2003. Back in my dark days of Procedural Programming, I remember someone giving me a problem, then banging out a few (hundred) lines of code, achieving my goal, and going on with my life. The next time a similar problem would arise, I’d rewrite, or in some cases, cut & paste my old code to achieve a similar, yet slightly different outcome.
  • Real Life SQL and .NET: Part IVJan 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.
  • Real Life SQL and .NET : using SQL with C#: Part XJan 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.
  • 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.
  • Moving C Structures into .NET with Custom MarshalingDec 17, 2004. Microsoft provides several attributes for marshaling C to C#. In our example we will take the case where we have hundreds of structures and only a few API calls, so we only need to generate the marshaled code for the structures.
  • Data Access Layer to execute Stored ProceduresJan 18, 2005. This article explains about executing a single stored procedure or batch of stored procedures from the application layer. As Data access layer completely decoupled from Application layer we just need to change the Application layer in case of any change in underlying database schema.
  • Insert Master-Detail Data using Transact-SQLJun 24, 2005. Microsoft SQL Server 2000 SQLXML allows among other things to manage batch operations in a database, which reduces significantly the need of more than one round-trip to a database. OpenXML is a Transact-SQL statement that allows to represent data in XML format and can be used to insert, update, and delete more than one row (represented by an element) in a table or group of tables.
  • Automated Code Coverage and Unit TestsMar 08, 2006. A short tutorial that explains how to use a code coverage tool and how it can be integrated with unit tests to allow us to determine how well the unit tests exercise our application/classes. Code examples are written using C#.
  • 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.
  • Illustrates the use of the lock in multithreading applicationAug 17, 2006. Any application must have one or more processes. A Process is structural unit with a memory block and using some set of resources. For each executable, the Windows operating system creates some isolated memory block. This article tries to explain the use of lock basics of Multithreading in C# .Net.
  • Building Custom Paging Web FormAug 21, 2006. Sometimes we may need to build our own data objects instead of using DataSets & DataTables. But in this case, we will lose all paging and sorting facilities that is represented using DataSets & DataTables. To overcome this small issue we'll have to write our own custom paging feature as well as with sorting.
  • Leveraging the "using" keyword in C#Jan 17, 2007. The “using” keyword in C# is one of the best friends of programmers but many of us may not realize this. The “using” keyword is used in two cases – First when importing a namespace in your code and second in a code block.
  • Interoperability between WCF and Oracle Application Server : Part IJan 24, 2007. This article is part of series intended to show how to use Web Services related technologies to interoperate applications running in different platforms, in this case, the most common scenario between Microsoft.NET and Oracle AS platforms.
  • Enforce Text Case with Custom ControlsApr 02, 2007. This article shall describe the construction of three custom controls; each is used to format its text content to be either all upper case, all lower case, title case, or normal (as typed) case regardless of the format of the input.
  • Enhanced Oracle Explorer in C# and .NET Using Windows FormsApr 27, 2007. This application will allows to do multiple simple activities on oracle database like running select statements and getting selected procedure's definition simultaneously in a thread-based GUI.
  • Generate SQL Statements With Objects, Attributes and ReflectionJun 12, 2007. Create a SQL Command with SQL Statement and Parameters dynamically.
  • Connection PoolingAug 11, 2007. While performing any database activity it is necessary that every single connection need to be closed, but in case your application throws some exception in that case our connection wont’ get closed. And you will get error “Cannot open connection, it is already open” In this article I will be discussing what is connection pooling? Why connection polling & how we can enable connection pooling etc.
  • XML in SQL Server Part 1Feb 27, 2008. This article gives you an overview of working with XML in SQL Server.
  • Anonymous methods in C#Mar 06, 2008. This article discusses the anonymous methods as a new feature in .NET 2.0, it will show you how to associate a delegate directly to a block of code statements at the time of event registration.
  • Configuration Sections; Introducing the Custom Configuration Section Concept: Part IApr 14, 2008. Custom sections of an ASP.NET Configuration File are customized sections that a developer configures by himself. In this case, the developer also sets their attributes and elements to suit special application needs in terms of settings.
  • Add and handle connection strings in an application configuration file: Part IApr 17, 2008. There are two ways to save data and parameters. In this case we save application parameters like information entered by the user during the installation process.
  • Introduction to The Resources .resx and Resources Files: Part I May 05, 2008. In some cases an application needs some external resources to perform specified tasks. And I mean by external resources, those none executables data logically deployed with a given application.
  • Using Symmetric Algorithms to Encrypt DataMay 20, 2008. In this article, I will propose a method of how to encrypt data and store it using symmetric algorithms whose are, in fact, four integrated classes within the .Net framework, namely DES,RC2,Rijndael and TripleDES but I will perform the task using the two last ones as they are the mostly used in real time cases.
  • Using the default keyword in C#May 22, 2008. The keyword default plays several and important roles in the C# language, therefore, I will enumerate some cases where the default keyword is used.
  • Using LINQ to Objects in C#May 26, 2008. This article provides an introduction to employing LINQ to Objects queries to support a simple win forms application; the article addresses the construction of LINQ to Objects statements and then goes on to describe how one might use LINQ to Objects within the context of an actual application.
  • Encrypt and Decrypt Sensitive Metadata Within Your Config file Jun 18, 2008. In a certain cases, metadata embedded within your configuration file is sensitive. In fact, imagine that you develop an application that uses a data base as data source; all information about this data base is located in the configuration file. What if a hacker success to log into your configuration files and obtains the connection string and other metadata about your data base??
  • UML Interview Questions Part 1Nov 09, 2008. In this section will be cover Use case digrams,Class digrams,Composite digrams,Sequence digrams,Object digrams
  • Visual C# IDE Tips: Part IINov 11, 2008. This post explains the some more tips on using Visual C# IDE to enhance developer productivity.
  • 6 basic steps of how to create a WebPart in SharePointJan 26, 2009. This is beginners tutorial of how to deploy a WebPart in SharePoint. It is a 6 step procedure and this tutorial will walk through the same. In case you are fresher to SharePoint you can read my FAQ articles listed below. I am sure within an hour you can get acquainted to SharePoint and get started.
  • Using Statement in C#Feb 09, 2009. This article is about Using statement and how it has been implemented.
  • Unit Testing with VS 2008 Team editionFeb 15, 2009. Unit tests allows the developers and testers to check the logical errors in the methods of classes in C# and VB.NET Projects.Unit test can be created once and can be run every time that source code changes.Unit test cases make sure that no bugs are introduced when you write the new code.
  • How to Prepare Quotations (Project Estimates) Using Use Case Points May 17, 2009. Quotation (Project Estimation) is one of the important aspects of software cycles. Any prediction less or more will affect the project a lot. Let's look at how basically day to day businesses manage their ways of handling quotations.
  • Search and selection of data using LINQMay 27, 2009. In this article I will explain how you can use LINQ, when we should search and select some data according to parameters, defined by users.
  • Windows Vista Security, Review of Data Execution Prevention Jun 03, 2009. Windows Vista introduces a range of new technologies that make the most secure desktop version of Windows to date. The following article provides an objective analysis of one of these improvements. Our goal is to help people better understand the true security climate that awaits them with Windows Vista, in this case with DEP (Data Execution Prevention).
  • Singleton Design Patterns in C#Jun 08, 2009. Whenever we want that a class has only one instance and it should have global point to access it but allowing the flexibility to create more objects if the situation changes,in that case we will use Singleton Design Pattern.
  • SQL Server 2005 features - Part ISep 18, 2009. This article explains about the features in the sql server 2005 with example sql statements.
  • Creating Data Adapters with the Data Adapter Configuration Wizard Oct 14, 2009. This article will help you in understanding Creating Data Adapters with the Data Adapter Configuration Wizard.
  • Control Statements in C#Nov 20, 2009. In this article I will explain you about different control statements in c#.
  • Data Persistence Navigation in Silverlight 3Dec 16, 2009. There are situations where you need to input some data as well as navigate to a specific page and come back to enter data again. In that case usually Silverlight doesn't persist data.
  • Exception Statements in C#Dec 24, 2009. In this article I will explain you about Exception Statements in C#.
  • Try-Finally in C# Dec 28, 2009. In this article I will explain you about Try-Finally in C#.
  • Throw Statement in C# Jan 01, 2010. In this article I will explain you about Throw Statement in C#.
  • Create a Data Adapter in ADO.NET Jan 28, 2010. In this article I will explain how to Create a Data Adapter in ADO.NET.
  • MVVM implementation for Windows formsMar 03, 2010. In this article we will see how to implement the MVVM for the case of the Windows Forms.
  • Programmatically Enumerating, Attaching, and Detaching SQL Server DatabasesApr 14, 2010. This writing is like an encyclopedia for the SQL statements and stored procedures used to enumerate, attach, and detach databases on a SQL Server instance.
  • WPF and user interactivity Part V: Drag and Drop for WPFApr 28, 2010. In this article, I will show a very simple and basic drag and drop use case.
  • RelativeSources in WPFMay 11, 2010. In this article, I will expose the use cases of the RelativeSources in WPF.
  • Goto statement in C#Jul 17, 2010. How to use go to statement in C#.
  • Toying with the C# 4.0Sep 03, 2010. In this article, I will expose those two issues not thought the theorist manners but thought real cases via some implementation techniques.
  • Steps to make public site in Share pointSep 06, 2010. In Share point when dealing with internet site we should have some situations where we need to give access to some people who were not in our Active directory or Databases(In case of Forms Authentication).
  • Is it Possible to Use the Select Statement to Access Stored ProceduresSep 07, 2010. In this article you will learn how it possible to use the select statement to access stored procedures.
  • AFTER INSERT TRIGGER Example Using the Inserted and Deleted TablesOct 14, 2010. DML trigger statements use two special tables: the deleted table and the inserted tables. SQL Server automatically creates and manages these tables.
  • Testing DocumentsOct 18, 2010. In this article you will learn about Testing Documents.
  • Hosting WCF Service inside IISNov 12, 2010. Windows Communication Foundation(WCF) takes many existing communication technologies, such as Web Services, Windows Remoting, Microsoft Message Queuing, and abstracts them into a single technology. In most cases, this simplifies the way you communicate with other applications.
  • Using statement in C#Nov 22, 2010. The using statement defines the scope of the object/resource.
  • Named arguments in C# 4.0Dec 02, 2010. This new feature of c# 4.0 allows users to define arguments in the calling statement in any order rather than defined in the parameter list.
  • Betterness rule while calling a method in C# 4.0Dec 03, 2010. In a case where a method is overloaded and along with that some of the parameters are optional for one or more definitions, then there is some confusion related to which version of the overloaded method is to be called.
  • How to: Easily Query a DatabaseFeb 14, 2011. Often there is a need to obtain data from a database and sometimes it becomes hectic to write pieces of code again and again. Like Connection Open statement, Error Message Coding, Connection string etc. This can be optimized by making a class and calling the methods of the class with the appropriate query string.
  • Configure Remote BLOB Storage (RBS) with the FILESTREAM provider (SharePoint 2010)Feb 23, 2011. In This article I am describing about how to install and configure Remote BLOB Storage (RBS) with the FILESTREAM provider on a Microsoft SQL Server 2008 database server that supports a Microsoft SharePoint Server 2010 system. RBS is typically recommended in the case where the content databases are 4 gigabytes (GB) or larger.
  • SQL Server: WAITFOR StatementMar 07, 2011. WAITFOR statement used to delay execution of T-SQL command for a specified period of time. This can be used to block the execution of batch statement, stored procedure and T SQL commands for a specified time.
  • Creating Credential Store for Form Authentication in ASP.NET 3.5Mar 22, 2011. When we don’t want to validate user on window credential, in such cases we can take help of ASP.NET infrastructure for implementing our own authentication infrastructure which includes custom login page that validate user against credentials like database and later established security context on each request.
  • Acceptable uses for the goto statement in C#Apr 05, 2011. In those days, he had a point because the 'goto' statement produced a lot of spaghetti code particularly by those using early versions of the BASIC programming language.
  • Implicit DataTemplates in Silverlight 5, With practical case studyApr 20, 2011. As we know Silverlight 5 Beta has been released with some exciting features for developers. Based on the priority and the importance for a LOB application I am trying to cover the features. In my last article we discussed XAML binding debugging option and in this artiucle we are going to have a look into the new implicit DataTemplate feature.
  • Computer Aided Software Engineering Tools (CASE)Apr 26, 2011. CASE stands for Computer Aided Software Engineering which is software that supports the software development process
  • TFS 2010 Scrum - Relation between PBIs, Tasks, Bugs and ImpedimentsMay 04, 2011. In Scrum, the product backlog is the list of requirements for the system. In this article we are going to see how the Product Backlog Items (PBIs), test case, tasks and bugs are linked.
  • How to Use InsertBatch With BSon Serialization in a Mongo database in C#May 17, 2011. In this article I will describe the use of the insert batch statement in a Mongo database for inserting a large amount of data.
  • Case Statement in SQL ServerJun 02, 2011. In this article I will describe the usef of a case statement in SQL Server.
  • Attributes in C#Jun 08, 2011. In this series we will see the usage of “Attribute” with the help of some examples and creation of our own custom attributes to be used in a sample use case.
  • Fixed Value based Status Indicator in SharePoint 2010Jun 13, 2011. In this article we will be seeing how to create fixed value based Status Indicator. In some cases we may need to enter the value manually for a status indicator.
  • Building .NET Enterprise Applications with Patterns: Part I - Introducing Enterprise DevelopmentJun 19, 2011. This explains what enterprise applications are, how to build them and provides an introduction to a case study.
  • SQLCommand Class ConstructorJun 24, 2011. The SqlCommand Class is used for T-SQL, SQL statements and stored procedures to execute against a SQL Server database. This class cannot be inherited because it is a sealed class.
  • Tab Control in JavaScriptJun 28, 2011. Here we create a simple tab control in JavaScript. In this case when we mouse over the tab it activates and we are able to see the contents.
  • Imperative Control Statements in F#Jul 08, 2011. In this article you will learn about F# Imperative control statements which includes if-then, elif, else and looping statements. The people who want to learn F# can have a quick review.
  • Proper Usage of Form.AcceptButton and Form.CancelButton Properties in Windows Forms ApplicationsAug 03, 2011. In this article we will first pass from simple to more complex cases which programmers might encounter in practice and then provide a full scale solution to the problem of maintaining AcceptButton and CancelButton properties in form of ready-to-use set of classes. Finally, we will provide an example which demonstrates how simple it is to use these classes.
  • Web Service Design for Chunked Transfer of Large Quantities of DataAug 18, 2011. In this article we are going to demonstrate design techniques which can be used to produce such Web service. Solution which will be developed along the course of this text is for demonstration purpose only and cannot be applied to practical, real world problems as is. But we hope that methods used to develop it can be applied to much more complex cases.
  • How to Create a Read Only Farm or Site in SharePoint 2010Aug 29, 2011. This article describes how to run a Microsoft SharePoint Server 2010 farm in which some or all databases are set to be read-only. This will be useful in the case of migrating your content databases from one server to another.
  • Creating Generic Enums using C#Oct 11, 2011. An enum variable can then be set to any one of these constants or (in the case of ‘Flags’ enums) to a meaningful combination of them.

About case-when-statement

NA
File APIs for .NET
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!
Download Free eBooks