C# Corner

Resources  
  • GDI+ Tutorial for BeginnersDec 26, 2000. GDI+ is next evolution of GDI. In Visual Studio .NET, Microsoft has taken care of most of the GDI problems and have made it easy to use.
  • The Convert Class : Conversion Made Easy in .NETJan 08, 2001. The Convert class takes care of most of the data type conversions in .NET programming.
  • Using ListViews in C#Jan 18, 2001. As a Visual C++ user for 10 years I can say that Microsoft deserves praise for their new ListView class. The MFC ListView class was, well, unpleasant to use. C# makes life a bit easier with a richer property and method set for ListViews. Also, you can now, set the ListView to select an entire row in report mode, something that in Visual C++ you had to write a whole custom ListView control to do. Note also the nice grid lines.
  • 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.
  • Making UI more responsive using ThreadingFeb 12, 2001. This example shows how threads can help us to make User interface more responsive when we have some background jobs.
  • 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.
  • 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.
  • Reading and Writing to the RegistryFeb 28, 2001. This is a class that both reads and writes to the registry that I made while converting some applications to use C#.
  • 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. This is the first of the series of programs I wish to write to help myself get a handle on C#.
  • .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. 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.
  • 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 ..
  • Using ref and out ParameterJun 20, 2001. When we pass a parameter as ref to a method, the method refers to the same variable and changes made will affect the actual variable.
  • 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.
  • Synchronization in Parallel threadsJul 02, 2001. The Threads makes us able to run multitasks at a time. In fact Computers (John von Neumann Architecture) don't execute the tasks parallel .The OS gives threads permission (depend on thread priority) to work on CPU. The sufficient degree of parallelism keeps the CPU busy and it is efficient.
  • Time Ticker2Jul 04, 2001. Microsoft had made lot of Changes for Beta2, some of the changes are old Namespace such as System.WinForms modified to System.Windows.Forms. In addition no. of new Namespaces like Microsoft.CSharp, Microsoft.JScript, Microsoft.Vsa etc...
  • Calling Java Program from C#Jul 18, 2001. This article shows you how to call a Java program from C#.
  • 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 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.
  • 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.
  • 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.
  • 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
  • Interrogating System with WMI - Part 2Jan 24, 2002. After my last article on WMI it was time to get serious. WMI or Windows Management Instrumentation is useful on a local machine to produce a WINMSD type program but using it across a network makes it even more useful.
  • World Clock Using Windows FormsFeb 11, 2002. I developed a C# application for finding World Timings given the US Central Timing.
  • The Making of PongMar 12, 2002. The purpose of making this classic game was to show simple game structures in C#. Concepts include the "Game Loop", "Input" and "Paint. If you are just beginning in game programming, C# is turning out to be a great place to start.
  • 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.
  • Space Breakout - 2D Game Developed Using DirectX and C#Apr 11, 2002. GDI+ is a feature rich graphics API that makes sophisticated graphical effects highly accessible to the C# developers.
  • Space Breakout - 2D Game Developed using DirectX and C#Apr 11, 2002. GDI+ is a feature rich graphics API that makes sophisticated graphical effects highly accessible to the C# developers. Unfortunately if youve tried to develop smooth detailed animation using GDI+ you have undoubtedly discovered that just how slow it can be. Consequently it is not particularly suited to games development, if you want to really take advantage of your 1 gig + processor and that fancy new graphics card youre going to have to get a little more low level and dirty, enter Microsofts DirectX API.
  • Nemesis-7rc1 (Codename Deviate)May 13, 2002. Nemesis-7 is a full-screen 2D shoot’em up that makes use of the DirectInput, DirectSound and DirectDraw interfaces from DirectX. The player controls a spaceship which he uses to duel the computer opponent. I implemented some artificial intelligence to make the CPU play more human.
  • 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.
  • Nemesis-7rc1 ( Codename Deviate)Jun 13, 2002. Nemesis-7 is a full-screen 2D shoot’em up that makes use of the DirectInput, DirectSound and DirectDraw interfaces from DirectX. The player controls a spaceship which he uses to duel the computer opponent. I implemented some artificial intelligence to make the CPU play more human.
  • Developing a Windows Control Library - Digital ClockJul 08, 2002. A Windows control library is similar to an Active X Control that you have been developing using VC++.
  • 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.
  • Code InternationalizationAug 06, 2002. This is a very simple windows application example for localizing the application. Visual studio .NET makes it pretty simple to create localized applications and manage them.
  • Singleton Patterns in C# RevisedDec 16, 2002. I am coming from the Java world, where synchronizing the Singleton creation is common practice.
  • Events in C# Made Easy - Lesson1Jan 02, 2003. Events are useful for updating a user interface with changed data, or causing a piece of code to run after another piece of code has completed. .NET has brought us a powerful model for programming events.
  • 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.
  • Making Thumbnails of Transparent Images in .NET and C#Mar 28, 2003. When I started writing web applications using .NET, I found myself in need to dynamically create thumbnails of images that could be uploaded by the user or pulled from a database.
  • 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.
  • Making Transparent Controls using GDI+ and C#May 14, 2003. This article shows you how to draw transparent controls with the help of GDI+.
  • Java Like StringTokenizer in C# Jun 11, 2003. The StringTokenizer class is yet another implementation of a java-like StringTokenizer in C#.
  • A Virtual Clock in C# and GDI+Jul 01, 2003. This article describes how to create a virtual clock in C#. The hands of the clock are drawn using GraphicPaths.
  • Hard Coding Pape Size during PrintingJul 14, 2003. Every time I set up a new Windows printer I spend a few minutes going through every bit of the printer properties making sure that every bit is set to A4. The code discussed in this article shows, how you can do it programmatically.
  • 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.
  • Reading and Display Source of Web PagesDec 30, 2003. This sample project is made to help ASP.NET developers. This projects highlights how to add HTML page inside your ASP.NET page which is hosted on same or different webserver. This page can still run on that server and only output is included in the ASP.NET page.
  • Understanding SQL Server Yukon Service BrokerFeb 25, 2004. The new version of Microsoft SQL Server™ "Yukon" comes together with a set of technologies capable of enlarging the horizon for database applications. One of the most remarkable technologies is the Service Broker that makes it possible to build database-intensive distributed applications. In this article we explore the core concepts of the Service Broker and show how to use its potentialities to build applications with message interchanging.
  • Microsoft Application Center 2000 - An IntroductionMar 17, 2004. Application Center 2000 is Microsoft's deployment and management tool for high-availability Web applications built on the Microsoft Windows 2000 operating system. Application Center 2000 makes managing groups of servers as simple as managing a single computer.
  • Portal Development in ASP.NET 2.0Jun 04, 2004. The new security controls make authentication a breeze and web parts provides the user the means to customize content. Personalization and Membership features give developers a ready made framework for personalizing the site to suit individual user needs.
  • 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.
  • 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.
  • Microsoft Application Center TestOct 13, 2004. Application Center Test (ACT) stress tests Web servers and analyze performance and scalability problems of Web applications. ACT simulates a large group of users by opening multiple connections to the server and rapidly sending HTTP requests. It also supports several other authentication schemes and the SSL protocol, making it ideal for testing personalized and secure sites.
  • Leveraging on XML feature of Microsoft Office Word 2003Nov 24, 2004. Word 2003 came up with a new feature of saving the conventional word document (.doc) files in the XML format. You can retrieve the information inside the Word 2003 documents by using the XPath queries and some logic.
  • A Chess Program using C#Nov 29, 2004. This is a chess program, made using C#. It has used object oriented concepts and design patterns like Flyweight, Factory and Decorator. Two player can play this game and it has facility to drag-drop pieces. It also shows potential positions of each pieces which is useful for learning.
  • What does .NET really mean? – Understanding .NETFeb 10, 2005. The .NET Platform and .NET-Aware Programming Languages, particularly C# are already making a turnaround in the way Applications are developed in the enterprise world.
  • 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.
  • DNS QueryAug 18, 2005. This example shows similarity of c# and java and how to implement dns query.
  • New Dataset features in ADO.Net 2.0Aug 22, 2005. ADO.NET class libraries are used for accessing data from a wide range of data sources. One of the best features in ADO.Net is DataSet.Even though it was an exciting feature, performance was a concern with DataSet. Lets look some changes made to DataSet in ADO.Net in this article.
  • 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
  • Smart HTML Editor in Visual Studio 2005Nov 16, 2005. If you have been writing Web applications using Visual Studio, at some point you would end up editing HTML file by hand. Now HTML Editor available in Visual Studio 2005 now supports Intellisense, which makes developers life much easier when editing HTML file by hand.
  • 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.
  • Visual Guard for .NETJan 19, 2006. Novalys announces Visual Guard, which is aimed at setting up user’s profile and permissions for .net application (who is allowed to do what?). The tool easily integrates to any .net application and makes rights/permissions management easier thanks to its administrating console.
  • 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.
  • C# Interface Based DevelopmentMar 06, 2006. When trying to build maintainable, reusable, and flexible C# code, the object oriented nature of C# only gets us 50% of the way there. Programming to interfaces can provide us with the last 50%. Interfaced-based design provides loose coupling, true component-based programming, easier maintainability and it makes code reuse much more accessible because implementation is separated from the interface.
  • Antialiased Analog ClockApr 04, 2006. This is an antialiased analog clock sample written in C# using GDI+. It has no flicker at run time because of using Double Buffering technique, and it has many properties that you can customize it such as tick and hand colors, gradient background color, custom date and hand styles.
  • 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#.
  • TDO - Typed Data Object 2.0Aug 10, 2006. Tdo – Typed Data Object is a set made up of a base classes library and a .NET 2.0 source code generator for Data Layers based on Ms Sql Server 2000/MSDE/2005/EXPRESS databases and the .NET Framework 2.0.
  • Multithreading Made Easy in .NET 2.0Aug 31, 2006. This article demonstrates a very easy alternative to normal multithreaded programming in .NET. A freely available library called CSP.NET is presented and a sample application shown.
  • 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...
  • Analog Clock Widget in C#Dec 08, 2006. The code is commented and I think it's easy for a reader to understand it and use it or add code of his own.
  • Database connection object with application-wide scopeJan 02, 2007. This article describes a class that can be placed in a Visual Studio C# project that makes a connection object available to any of the other classes in the project.
  • Stock Tracker Custom Control in C# .NETMar 07, 2007. This article describes the construction of a custom control used to check stock prices as made available through a public web service.
  • Accessing Oracle Database from Microsoft.NET 2.0 using Oracle Data Provider for .NETApr 16, 2007. This article is intended to show how to access the Oracle database using ADO.NET programming model and Oracle Data Provider for .NET (ODP.NET) that Oracle makes available.
  • Introduction to XNA: The Microsoft 2D and 3D Game Development PlatformApr 20, 2007. This article introduces you to the XNA Framework that makes game development easier than it ever was before. This sample features a star trek ship which you can move around the screen and shoot at the enemy Klingon Ship. The demo comes complete with authentic sound.
  • C# Asynchronous, Multi Threaded Development... Digging In. Part IIMay 13, 2007. In this article we'll dig a bit deeper into what is actually happening when we use the asynchronous calls using C#. Just as in my previous article, we'll simulate a long running I/O bound process as if we were fetching records from a database, making a web service call or reading or writing from a file and see how we can write more performant code by letting the main thread continue on and not wait for the results. 
  • Scheduled WebService call using Windows ServiceJun 21, 2007. This Windows Service will call the web service at the Time mentioned in the App.config file. The Schedules can be made Monthly, Weekly and Daily (To be Set in the App.config file).
  • WPF Database Communication Adding new Record to the DatabaseSep 06, 2007. WPF Database communication Adding new record to the database (XAML-MS-Access), I have a XAML form with FirstName, LastName, Email & Contact fields in it on click of submit button it will first check if the same email address is exists in the table else it will add new record I have made use of OleDbTransaction to perform add functionality.
  • 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.
  • Automatic Reading and Verification of Microsoft Word document in C# using Aspose.WordsJan 17, 2008. Student Course Registration and Verification automatically reads the Roll Number slips in a Microsoft Word document. It parses the Microsoft Word document and then makes corrections if required. It also saves the document at the specified location.
  • How C# is Different From JavaJan 17, 2008. This article describes the various differences between C# and Java.

About Making-a-clock-in-java

NA

SPONSORED BY

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