C# Corner

Resources  
  • New Modifiers in C#Jan 26, 2001. If you come from a C++ or Java background to C# then you will of course notice some strange keywords introduced to this new language, especially the "new" and "override" modifiers.
  • Chat Server and Client in C# Using Remoting TechnologyFeb 16, 2001. This application is a simple Chat server and Client, which is conversion of Java RMI chat server and client. The Java client was a Applet and present application client in Windows Forms.
  • Chat Server and Client in C# Using Remoting TechnolgyFeb 16, 2001. The application is a simple Chat server and Client, which is conversion of Java RMI chat server and client. The Java client was a Applet and present application client in WinForm.
  • Sticky NotepadMar 05, 2001. I wanted to experiment with writing a program that would run from the "System Tray" of window (that's where you have the date displayed...) since that's not possible with pure Java.
  • Introduction to SOAPMar 22, 2001. Since the release I have been fascinated with this thing called SOAP, This bubbly new protocol backed by the power of XML is certainly going to make waves in the world of distributed computing. The first thing which comes into our mind is “Why the heck we didn’t think of this before?
  • Assemblies : The Ins and Out : Part IApr 13, 2001. In Part 1, I will cover what exactly an assembly is, and what an assembly contains.
  • Assemblies : The Ins and Out : Part IIApr 16, 2001. In this part, I will discuss both Private and Shared assemblies and how to create a "Shared Assembly".
  • Assemblies : The Ins and Out : Part IIIApr 20, 2001. In this part I will discuss in more detail than Part 2, the available utilities for manipulating assemblies.
  • Line numbering utility in C# and JavaMay 08, 2001. After reading this article Java programmers should be able to decipher and de-jargonize the .NET architecture and relate it with the proposed ECMA standard.
  • .NET framework comparison with Java ArchitectureMay 08, 2001. This article outlines Microsoft's proposed standardization of .NET framework in ECMA forum as CLI (Common Language Infrastructure), but the Microsoft documentation refer this as CLR (Common Language Runtime).
  • 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#.
  • Will Java and .Net Framework Co-exist?May 15, 2001. The article begins by briefly probing what constitutes the Java platform and .NET framework.
  • 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 ..
  • Net DDE to DOTNET RemotingJul 02, 2001. This article travel through time to trace the genesis of Dot Net Remoting right from RPC to RMI till SOAP.
  • Calling Java Program from C#Jul 18, 2001. This article shows you how to call a Java program from C#.
  • 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.
  • 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.
  • Web Services Between .NET, Java, and MS SOAP toolkitAug 24, 2001. This article will try to explain the how you can build web services and/or clients with any of the three languages: .NET, MS SOAP Toolkit and Java. But the real point of the article is to show you how you can build clients for web services from any of above-mentioned languages.
  • Web Service Between .NET, Java and MS SOAP Toolkit - Part IIAug 24, 2001. Second article in this series dedicated to Web services comes as a sequel to the first one in which I started to tell you how you could build different kind of clients and services using MS SOAP Toolkit, Apache SOAP for Java and .NET Framework.
  • Web Services between .NET, Java and MS SOAP Toolkit: Part 2Aug 24, 2001. This second article in this series dedicated to Web services comes as a sequel to the first one in which I started to tell you how you could build different kind of clients and services using MS SOAP Toolkit, Apache SOAP for Java and .NET Framework.
  • Exception Handling in C#Oct 17, 2001. Exception handling is a builtin mechanism in .NET framework to detect and handle run time errors.
  • 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++.
  • 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.
  • 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.
  • .NET Remoting: The Interface ApproachMar 26, 2002. .NET Remoting provides a powerful and high performance way of working with remote objects. Architecturally, .NET Remote objects are a perfect fit for accessing resources across the network without the overhead posed by SOAP based Web services. .NET Remoting is easier to use than Java's RMI, but definitely more difficult than creating a WebService. In this article, we will create a remote object, and access this object using the Interface.
  • Comparison of C# with Java: A Developer PerspectiveMay 29, 2002. The .NET is a language and operating system (on Windows as of now) independent platform pretty similar to Java.
  • 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.
  • Consumer/Producer Multithreaded ProgramNov 04, 2002. This is simple multi-threading program that adds and removes elements in an ArrayList. Producer button will creates a producer thread that adds elements in to the ArrayList. The maximum number of elements can be added to this ArrayList are 100 elements and the producer thread has to wait until the consumer thread/threads (creates by pressing consumer button) removes elements from the ArrayList. Then Producer thread starts to add more elements to the ArrayList.
  • MDX Query BuliderNov 11, 2002. In this article we will be developing a MDX Query Builder.This is similar to the MDX sample application operations, which carry out the transfer of blocks from the secondary memory to the main memory and vice versa.
  • Function to Change a Block of Text to Title CaseNov 20, 2002. Function to change a block of text to Title Case.
  • 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.
  • Singleton Patterns in C# RevisedDec 16, 2002. I am coming from the Java world, where synchronizing the Singleton creation is common practice.
  • Concurrency Control in ADO.NET using Threads and MonitorsDec 31, 2002. The concurrency controls system refers to the lowest level in architecture of a DBMS. It is relative to the input/output operations, which carry out the transfer of blocks from the secondary memory to the main memory and vice versa.
  • C# Versions of Java's StringTokernizerJan 13, 2003. Here is another C# version of the Java StringTokenizer Class from the version posted August last year on your site. Given a string and a set of delimiters, the class return an enumeration of substrings based on the delimeters passed in.
  • The "ins" and "outs" of Using Stored Procedures in C#Jan 27, 2003. This article reviews the creation of stored procedures with parameters using the Visual Studio IDE.
  • PERST: A Simple, Fast, Convenient Object Oriented DatabaseMar 05, 2003. PERST is a simple Object-Oriented Database implemented with pure C-Sharp and Java implementations.
  • Basics of Extending Your Working Environment in Visual StudioApr 10, 2003. All of us have used Macros in Microsoft Office and Add-ins in Visual Studio 6 and I am very sure all of us have been impressed as well by their power to control their own working environment.
  • Building Data Access Helper Component for Microsoft SQL ServerMay 13, 2003. In this article I will be going through the development of a class library similar to Microsoft Data Application Blocks.
  • Java Like StringTokenizer in C# Jun 11, 2003. The StringTokenizer class is yet another implementation of a java-like StringTokenizer in C#.
  • 2D ChartingAug 11, 2003. I was amazed at what the VS.NET IDE does for a programmer as I was primarily used to Java via the command line.
  • 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.
  • Automatically Break into Code When Calling Debug.AssertDec 22, 2003. This sample creates a dll that once referenced by your ASP.Net or Web Service app, just adding a small block of xml into your web.config file will cause the debugger to automatically break into your code.
  • Web Services-InteroperabilityAug 04, 2004. In this article, we will see what interoperability is all about, comparison between Java and .NET interoperability, the benefits of and challenges faced in interoperability and the role of WS-I in this overall scenario.
  • Creating a Managed Automated Information Agent(mBot)Aug 16, 2004. mBot manages multiple RTC Client objects and exposes interfaces to them via .Net Remoting and .Net Web Services so that they can be managed and used remotely by other .Net applications or from entirely different platforms such as a Java J2EE/SOAP application like Jabber running on Linux or Windows.
  • 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.
  • How to synchronize data in Pocket PC and main databaseOct 06, 2004. The main objective of the article is to present how to synchronize the data between the Pocket PC database and main database using Pocket PC Emulator and Web Service in .NET
  • Writing unsafe code - pointers in C#Oct 13, 2004. In this article I will give a short description of one of the feature of C# which are pointers and so-called unsafe code. This subject is particularly close for C++ programmers. Moreover, it is a feature that we do not find in Java.
  • 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.
  • Enterprise Library 1.0Apr 02, 2005. Enterprise Library is a set of tested, reusable application blocks that address common problems developers face when developing enterprise-based applications.
  • Publishing Exception in SPS Web PartsApr 11, 2005. This article tells the safe way of publishing exceptions using Microsoft Exception Management Application Blocks from WebPart.
  • Microsoft patterns & practices: The Enterprise LibraryJul 06, 2005. Microsoft patterns & practices provide scenario-specific recommendations illustrating how to design, develop, deploy, and operate architecturally sound applications for the Microsoft .NET platform.The following article covers details on the Data Access Application Block.
  • Microsoft patterns & practices: The Enterprise LibraryJul 12, 2005. Microsoft patterns & practices provide scenario-specific recommendations illustrating how to design, develop, deploy, and operate architecturally sound applications for the Microsoft .NET platform.The following article covers details on the Data Access Application Block.
  • Enterprise Library Caching Application BlockJul 12, 2005. Microsoft patterns & practices provide scenario-specific recommendations illustrating how to design, develop, deploy, and operate architecturally sound applications for the Microsoft .NET platform. The following article covers details on the Caching Application Block.
  • Simple Captcha with ASP.NetAug 01, 2005. A solution to block bots submitting to your database using C#.
  • DNS QueryAug 18, 2005. This example shows similarity of c# and java and how to implement dns query.
  • Migrating from Java to C# Oct 03, 2005. Microsoft has created a tool called Java Language Conversion Assistant (JLCA), which automatically converts Java code into C# for developers who want to move existing applications to the .NET Framework.
  • 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
  • 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.
  • Web Service : Asynchronous call by using Java Script and DHTML behaviourDec 31, 2005. This article shows how to make asynchronous call of web service by using Java Script and DHTML behaviour.
  • Migrating Java RMI to .NET RemotingJan 16, 2006. .Net Remoting and Java RMI are mechanisms that allow the user to invoke method/methods in another address space. The other address space could be on the same machine or a different one. These two mechanisms can be regarded as RPC in an object-oriented fashion. This article describes how to migrate java RMI applications to .NET Remoting applications, with practical examples.
  • An Introduction to C# GenericsFeb 06, 2006. There is a reality; most of the developers confuse about C# Generics. Actually, there is no reason for that. If your background comes from C++ or Java you may understand more easily. What “Templates” tell you from your C++ knowledge or “Generics” from Java.
  • Integrating .NET Web Services with Java and classic ASP Clients for InteroperabilityFeb 13, 2006. The goal of this article is to show to integrate Microsoft's .NET Platform Web service with other platform like Java and ASP. The samples demonstrate basic techniques and principles that are used to cross-platform interoperability via Web services.
  • Web Services for .NET and J2EE InteroperabilityFeb 13, 2006. Web services technologies are designed to support the interoperability between many different application development platforms that exist today. This article is focused on the fundamentals of .NET and Java interoperability using Web services technologies.
  • MVC architecture in ASP.Net using C# and Microsoft Data Access Application blockFeb 28, 2006. In this article we will learn how to use Microsoft Data Access Application block in ASP.Net using C#, I have used Microsoft Data Access Application block in conjunction with MVC architecture, here you will learn lot about class libraries, interface, implementation etc.
  • Simple Factory Pattern Side by Side with Abstract PatternMar 02, 2006. This article will discuss the Simple Factory Pattern and how to use it with Abstract Factory Patter discussed in the previous article.
  • Top 10 Reasons to Switch from Java to Visual C#Jun 03, 2006. This article details the major reasons for Java programmers to consider switching from the Java language to Visual C#.
  • Six C# features Java developers will kill for...Jun 21, 2006. C# is called Java on steroids, and everyone agrees that it is based on some long-time Java ideas and concepts. But, there are differences, and some of them make C# very powerful compared to Java. Here are six of them.
  • Six Java features C# developers will kill for...Jul 06, 2006. Not everything on the .NET framework is perfect, and Microsoft still has more improvements to implement. This time we will look at six features available to Java developers but unfortunally absent from C#.
  • Developer Roadmap For Building Smart Client ApplicationsAug 08, 2006. This article is a developer Roadmap For Building Smart Client Applications.
  • 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.
  • A Basic .NET and J2EE Interoperability using WebSphere MQ Sep 13, 2006. This artile explains a Basic .NET and J2EE Interoperability using WebSphere MQ. It shows the sending of message from DotNet Application then consuming by Java application using Websphere MQ and vice versa.
  • Using Predicates over foreach in ArraysOct 24, 2006. We generally use foreach blocks to iterate through Arrays n Lists in order to operate on them which not only makes our code long n confusing but also makes us compromise on performance. The solution to this lies in Predicates...
  • 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.
  • OleHelper for Microsoft Access (.MDB) in ASP.NET 2.0Apr 18, 2007. This article is very much similar to the Microsoft Data Access Application Block, provides static methods in a "sealed class OleHelper" where I have Execute Dataset, ExecuteNonQuery & PrepareCommand to work with Microsoft Access database.
  • Enterprise Library 3.0 Data Access Application BlockJul 12, 2007. Data Access Application Block(DAAB) simplifies development tasks that implement common data access functionality.The DAAB provides access to the most often used features of ADO.NET in simple-to-use classes; this boosts developer productivity.
  • Generic Data Layer - One time creationSep 06, 2007. This article will explain how to create a generic data layer that can be used with very less amount of coding. It is a known fact that, most of the time we create applications for Create , Select , Update, Delete. And every time, we end up with writing similar set of code for every execution of our stored procedures.
  • Introduction to Building a Plug-In Architecture Using C#Sep 10, 2007. In this article we'll take another look at how we can use the state pattern to build a plug-in architecture that will allow us to change the behavior of our application by placing differnt plug-ins into a folder.
  • ASP.NET Multiple File UploaderJan 04, 2008. This article tells you how to allow users to upload more than one file at a time.
  • How C# is Different From JavaJan 17, 2008. This article describes the various differences between C# and Java.
  • Functional Programming with C#: Advanced Asynchronous ProgrammingJan 21, 2008. I wrote about functional asynchronous programming in an earlier article and now will expand on the topic to look at ways to re-synchronize results from asynchronous function calls.
  • Comaprission of dates for a year in JavaScriptFeb 29, 2008. This article and code snippet shows how to use JavaScript to validate dates in a method for a year.
  • 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.
  • Using Validation Application Block (Enterprise Library 3.0) with the FormView controlMar 15, 2008. In this article I will show how you can use the Enterprise Library 3 Validation Application Block (VAB) to validate data, edited with the help of the FormView control. The examples are written using C#.
  • High Performance Abstraction Layer for Non-Blocking Asynchronous Thread Safe SqlServer CallsApr 25, 2008. One of the things I find myself doing frequently is writing (and re-writing) plumbing code to execute database CRUD operations. I wrote an abstraction layer over asynchronous SqlServer calls that allows developers to correctly make async calls agains SqlServer without having to deal with any of the complex plumbing normally required. All source code is included with this article.
  • Opening Jars with C# Jul 07, 2008. This article shall describe an approach that may be used to extract Jar files. Jars are merely files compressed using zip compression; the primary difference between a standard trash zip file and a jar file is that the jar file includes a manifest; also a true jar files can be run as an executable on a machine equipped with the java runtime.
  • Password Encrypted Zip files in C# Oct 27, 2008. This article contains the source code for creating Zip files in C# that are password protected using PKWare encryption.
  • TextBlock in WPFJan 06, 2009. In this article, I discussed how we can create and format text in a TextBlock control available in WPF and C#.
  • Introduction to Enterprise Library: Part IJan 13, 2009. This article gives an introduction to Enterprise Library.
  • Introduction to Enterprise Library: Part IIJan 19, 2009. This article explains Attribute based validation in a Validation Application Block.
  • DI using Unity Application BlocksJan 20, 2009. In this article we will take up a simple example and try to implement DI using unity application blocks thus resulting in loosely coupled architecture.
  • Five step of how to use logging utility in your projects using application blocksJan 21, 2009. It's new world of software reusability. Gone are the days when we need to build things from scratch. One of the most needed functionality is the logging utility. Every software project needs a logging utility. To make your own logging utility is a big project by itself. In this tutorial we will quickly run through how you can use Microsoft logging application blocks to log messages and activities.
  • Introduction to Enterprise Library: Part IIIJan 21, 2009. This article explains about Attribute based Validators and Rule sets of Validation Application Block.
  • 4 steps to use readymade DAL component (Data application blocks)Jan 23, 2009. This tutorial will run through the necessary steps of how you can use Enterprise data application blocks in your DAL component.
  • Introduction to Enterprise Library: Part IVFeb 03, 2009. This article explains about Configuration based validation using Validation Application Block.
  • Introduction to Enterprise Library: Part VFeb 05, 2009. This article explains about implementation of Self Validation using Validation Application Block.
  • Introduction to Enterprise Library: Part VIFeb 06, 2009. This article explains about Validation Application Block Adapter for ASP.NET.
  • Introduction to Enterprise Library: Part VIIFeb 10, 2009. This article explains about Validation Application Block Adapter for Windows Forms.
  • Introduction to Enterprise Library: Part VIIIFeb 17, 2009. This article explains about Validation Application Block Adapter for WCF.
  • Dynamic validation according to logged in userFeb 18, 2009. Many times we want certain set of validation to fire for some user and certain set of validation to fire for some other user. In the section we will see how we can achieve the same using Microsoft enterprise validation blocks.

About Synchronized-Block-in-java

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