Current area: HOME -> C# -> General Articles Articles
General Articles
A Comparative Overview of C#
This article will focus on the new ways of programming C# offers, and how it intends to improve upon its two closest neighbors, Java and C++. C# improves on C++ in a similar way to Java in many respects, so I'm not going to be re-explaining things like the benefits of a single-rooted object hierarchy.
A Quick view from C/C++ to C#
There are many programming languages to program a computer. The most popular and basic ones are Basic, C, C++, Pascal, Java, and Assembler.
Accessing Subversion repository from .NET using DotSVN
An article that describes in detail how to connect to Subversion repository from a .NET application using DotSVN library.
DotSVN is an OpenSource project whose objective is to re-implement the Subversion version control system completely in .NET. Many .NET libraries/tools are available to connect to Subversion repository. But DotSVN is unique in the fact that it is completely implemented in .NET and it accesses the repository at the repository level itself (and not at the Client level or Working Copy). Also, DotSVN does not depend on any Subversion libraries or binaries.
Builder Pattern in C#
This article is mainly focus on design patterns using C# and this is the first article of the series.In this article i will be discussing Builder pattern which is quite similar to Factory Pattern.
C# and its features
C# is a modern, type safe programming language, object oriented language that enables programmers to quickly and easily build solutions for the microsoft .NET platform
C# Data Structures
C# Net has a lot of different data structures, for example, one of the most common ones is an Array. However C# comes with many more basic data structures. Choosing the correct data structure to use is part of writing a well structured and efficient program.
C# Indexers
The thirteenth part of the C# Object-Oriented Programming tutorial describes the use of indexers. A class that has an indexer can be used in a similar manner to an array. Objects of the class can use array-style notation to present multiple values.
C# Input/Output Classes Simplified
Beginners to the .NET Framework sometimes have a hard time trying to understand the classes in the System.IO namespace for performing input/output (IO) operations. The difficulty stems from the fact that this namespace is relatively large, containing more than 40 members, some of which are similar classes that can be used to achieve the same tasks. Thus it is sometimes hard to figure out which class is best for which task. This article tries to make your life a bit easier by grouping IO tasks into three categories and introducing the classes that are suitable for each task category.
C# Interfaces
The twenty-first part of the C# Object-Oriented Programming tutorial completes the investigation of polymorphism in the C# programming language. This instalment describes the use of interfaces to determine required members in classes that implement them.
C# languages preprocessor directives
A preprocessor directive must be the only instruction on a line. Preprocessing directives are lines in your program that start with `#'. Whitespace is allowed before and after the `#'. The `#' is followed by an identifier that is the directive name.
C# or VB.NET - World War III
In this article I'm going to go under the hood and show you
what really happens to the in C# and VB.NET. I know many .NET
developers have this question in their mind. Which language do
I use to develop .NET applications? C# or VB.NET? Well, In this
article I'm going to go under the hood and show you want really
happens to the applications developed in C# and VB.NET.
C# School E-book .pdf (free)
This free 330 page e-book covers the .NET framework and the C# language. Starting with the basics of the language, it goes on to cover object oriented programming techniques and a wide range of C# languages features including interfaces, exceptions and delegates. Later chapters cover practical topics including database access with ADO.NET, building Windows forms applications, multi-threading and asynchronous I/O. The final chapter covers new features in C# 2.0, including generics.
C# Structures
The twenty-second, and final, part of the C# Object-Oriented Programming tutorial reviews the use of structures. Structures provide similar functionality to classes, but when instantiated resultant variables are value types, rather than reference types.
C#: A language alternative or just J--?, Part 1
This article compares C# to Java describing language features and design trade-offs and places C# in the context of Microsoft's broader .Net strategy.
Changing the default limit of 25 threads of ThreadPool class
According to the Microsoft documentation., "The thread pool is created the first time you create an instance of the ThreadPool class. The thread pool has a default limit of 25 threads per available processor, which could be changed using CorSetMaxThreads as defined in the mscoree.h file.
CLR Design Choices
Anders Hejlsberg, the lead C# architect, talks with Bruce Eckel and Bill Venners about IL instructions, non-virtual methods, unsafe code, value types, and immutables.
Control Statements
This lesson shows you how to use c# looping statements. In c#, there are four iteration constructs rather than three. There are familiar for, do, while loops and a new one from Visual basic, foreach.
Creating an Excel Spreadsheet and Adding Data to It Programmatically
The Interoperability services make it very easy to work with COM Capable Applications such as Word and Excel. This article reveals using Excel from a managed application. Excel is the spreadsheet component of Microsoft Office 2000. The majority of Excel programmatic functionality is exposed through Automation via the type library Excel9.olb. The intention of this article is to express that a managed application can interrelate with Excel as a COM server.
Creating Web Based Comments
There are times when you need to explain the core structure and logic of your program, having an intention to make it encapsulated and hidden at the same time.
Delegates, Components, and Simplexity
Anders Hejlsberg, the lead C# architect, discusses his notion of design simplexity, C#'s delegates, and its first class treatment of component concepts.
Delivering Reliable Software: Automated Unit Testing Applied to .NET
Delivering reliable software on schedule is crucial for any software development business. Unit testing, one of the basics of Extreme Programming, along with Refactoring, serves as a strong base for building a robust software. Born in Java world, this technique may work even better for Microsoft .NET. Read on to find out how to incorporate unit testing into your development process and explore the nuts and bolts of the testing framework.
DeviceIoControl & USB using Managed C++ & C#
Low level I/O is not part of the .NET framework, so information on how its done is difficult to find. Since I am using some specialized hardware, which won't be available to most C# developers, my comments will focus on interoperability with unmanaged code.
Document Processing Part I: OCR with Microsoft Office
Coming with MS Office 2003 the MODI library offers you an easy but effective way to integrate Optical Character Recognition (OCR) functionality into your own application.
Enumerates
Many developers already use enumerates with success. The advantage to using them is making the code more readable than using constant numeric values. In the following article we will talk about enumerations and how to use them. Finally, we will show how to add new functionality to take advantage of the .NET Framework features.
Future Editions in C#
Microsoft is planning to introduce new features to its C# Programming Language and its .Net Framework. These features are expected to be included in the Microsoft Visual Studio 2004 release code named "Whidbey". Here we will discuss four of these proposed features, which are Generics, Iterators, Anonymous Methods and Partial Types .
Getting Started with C#, Part 2
The single greatest challenge when learning to program is that you must learn everything before you can learn anything. Even this simple "Hello World" program uses many features of the language that will be discussed in coming chapters, including classes, namespaces, statements, static methods, objects, strings, inheritance, blocks, libraries, and even something called polymorphism!
How to create a virtual directory with C#
A simple example of using the DirectoryServices namespace in
.NET. This "how to" is only one more sample of how to use the
DirectoryServices namespace in the Microsoft.Net framework.
This sample uses IIS as its Active Directory provider. The
access to Active Directory in .Net is so easy. You use
System.DirectoryServices.dll for simple access.
Inappropriate Abstractions
Anders Hejlsberg, the lead C# architect, talks with Bruce Eckel
and Bill Venners about the trouble with distributed systems
infrastructures that attempt to make the network transparent,
and object-relational mappings that attempt to make the
database invisible.
Inserting images into Word documents using XML
I've seen many, many requests on the Microsoft newsgroups asking how you can insert a picture into a Word document without saving it to the file system first. This example application described in this blog illustrates both methods for inserting a picture firstly using the Word object model (InlineShapes.AddPicture) and secondly using Word's XML support (InsertXML).
Introducing C# 3
This is the first of a four part series on C# 3.0. It covers type inference, also known as implicitly typed variables. It explains what type inference is, why it is useful and the performance consequences of using it. It also looks at implicitly typed arrays.
Introducing C# 3 - Part 2 - Extension Methods & Lambda Expressions
The second part of our C# 3.0 series is here, covering extension methods and lambda expressions. Learn:
* What an extension method is
* How to write extension methods
* The new lambda expression syntax
* To use the higher order programming paradigm
Introducing C# 3 - Part 3 - Object Initializers & Anonymous Types
The third article in our C# 3.0 series covers the new features that will help you with building data structures. This includes:
* Object initializers
* Collection initializers
* Anonymous type is
* Type equivalence of anonymous types
Introducing C# 3 - Part 4 - Linq, Dlinq & Xlinq
The final part of our C# 3.0 series is about Linq - Language Integrated Query. Learn:
* What declarative programming is
* How to write Linq queries
* Sorts, joins, groups and query continuations
* What DLinq and XLinq are
Managed C# versus Unmanaged C++
This article is a good article describing how managed C# compares with unmanaged C++. Using a few different basic applications, you get to see the difference of C++ and C# and compare them both.
MSAGENT IN C#-Part1 [Text To Speech (TTS)]
In this piece of writing let us see some intriguing characters which speak to us using synthesized speech, recorded audio, or text in a cartoon word balloon. It even support for speech recognition. Let us see in detail.
MSAGENT IN C#-Part2 [ Speech recognition(SR)]
In this piece of writing let us see some fascinating characters which speak to us and support for speech recognition. Let us see in detail.
MSMQ, your reliable asynchronous message processing
Learn how to use MSMQ for your messaging and asynchronous processing needs. This article explains how to use the System.Messaging types to interact with MSMQ queues, send messages, receive messages and use transactional support. Further it explains how to use MSMQ triggers.
Opinion: Why I Chose C#
An editorial explanation of why my personal preference is C# over VB.NET, including some of the pros and cons of each language.
Pinging a Remote Computer (.NET)
When developing networked applications that rely on a remote computer being available, it is important to be able to check that the other system is operable. Using the .NET framework's Ping class, an ICMP echo request can be sent for this purpose.
Programming Outlook with C#
Microsoft Office provides a powerful component model to automate from another program. Using this object model, you can access Mail Items, Calendar Items, Journal Entries, and any other item that Outlook normally exposes. Using COM Interop you can automate Outlook from a .NET application. In this article we'll look at different approaches to working with Outlook folders, and walk through creating items in Outlook with C#.
Reverse Engineering To Learn .NET Better
This article looks at various mechanisms that can be used to
reverse engineer .NET applications and libraries for the
purpose of learning the platform better.
Rotor: You spin me right round
This column shares some of the highlights related to C# development on the Shared Source CLI platform. This small application covers many C# concepts, such as how to do network I/O, call native code using P/Invoke, and write a simple GUI using TCL/TK.
SharpDevelop C# Coding Style Guide
The SharpDevelop C# Coding Style Guide was written by Mike Krueger. This document can also be read as a guide to writing robust and reliable programs. It focuses on programs written in C#, but many of the rules and principles are useful even if you write in another programming language.
Shifting Software Industry : .NET Technology
Discussing about the normal variations in the industry to come
up to .NET. Like .NET What's & Why ? How much .NET is providing
and what are the expectations to this technology.
Testing .Net Components Using NUnit
"Hey, I'm having a problem with this timesheet application I'm working on. The piece that stores employee info isn't working correctly" I said to our resident alpha geek as he popped his head into the cubicle. "Ok, lemme see. Where are your unit tests?" he said. "uhm, I haven't written them yet" feeling a mental backlash coming. "Well then it works. At least you have nothing to say it doesn't work right?" he says walking away. Mental note - "Write unit tests before starting development". Writing test allows me to see immediate results of every code change. Although I do spend time on developing these tests, I'd rather write them then have to come back later and debug the code without any indication of where exactly the bug may be. Other developers can also use these tests when integrating with my code or maintaining it later.
The Design of C#
Anders Hejlsberg, the lead C# architect, talks with Bruce Eckel
and Bill Venners about the process used by the team that
designed C#, and the relative merits of usability studies and
good taste in language design.
The New Anonymous Types Feature in C# 3.0
At the PDC 2005, on the eve of the release of C# 2.0 (C# Whidbey), Microsoft previewed its plans for C# 3.0 (C# Orcas). Along with a list of fantastic new features such as Language Integrated Query (LINQ), Redmond also described a new feature called anonymous types. This article takes a deeper look at anonymous types.
The Trouble with Checked Exceptions
Anders Hejlsberg, the lead C# architect, talks with Bruce Eckel and Bill Venners about versionability and scalability issues with checked exceptions.
Top 10 reasons C# is better than VB.NET
Let's get practical, religion aside, with an eye on programmer productivity, here are the top 10 reasons why C# is better than VB.NET, in no particular order. If you have some other ones, let me know.
Top 10 reasons VB.NET is better than C#
Very few programmers have the luxury of toiling on their code for a really long time - we are expected to churn apps out in a quick manner. Which means that to be productive, we must use tools that enable us to be that. So let's get practical, religion aside, with an eye on programmer productivity, here are the top 10 reasons why VB.NET is better than C#, in no particular order
Top Ten Traps in C# for C++ Programmers
In an article for the July 2001 MSDN Magazine I talked about what you need to know to move from C++ to C#. In that article, I mentioned that the syntax of C# is very similar to that of C++ and that the difficult part of the transition was not the language itself but getting comfortable with the managed environment of .NET and understanding the extensive .NET Framework.
Transferring files and monitoring Bluetooth ports in C#
Sometimes there are problems transferring data between two Bluetooth devices. We can't transfer some type of files, we can't discover the data transfer service (protocols) , for example the OBEX or FTP protocol, which is above the RFCOMM layer of the Bluetooth protocol stack. But the devices can communicate on the lower RFCOMM layer. If we have control over two devices, for example PC or Pocket PC, we can create C# programs for file transfer. We will show you, how to transfer files with Bluetooth technology without the use of additional software and how to monitor the serial port bytes traffic in C#. You can reuse the code in this article to create your application to transfer data also in environment when you can't do that with standard Bluetooth application.
Understanding Generic Types in C#
Before we start tampering around the code, lets understand why we need a generic type? Well in most of application development we come across lots of situation where we need a type which can hold both value types and reference type. In this situation we need a generic type which can do both.
Using .NET to make your Application Scriptable
Shows how to use the built-in compilers in the .NET framework to allow users of your product to write script to control and hook in to the application.
Using the New Extension Methods Feature in C# 3.0
One of the numerous exciting new features in C# 3.0 is extension methods: static methods that you can invoke using the instance method syntax. This article discusses this new feature in detail with sample code and recommendations for best use.
Versioning, Virtual, and Override
Anders Hejlsberg, the lead C# architect, talks with Bruce Eckel
and Bill Venners about why C# instance methods are non-virtual
by default and why programmers must explicitly indicate an
override.
What You Need to Know to Move from C++ to C#
This article explores the language features that are new to C# such as garbage collection, properties, foreach loops, and interfaces...
Whats New in C# Programming Language 2.0
Microsoft is planning to release the new version 2.0 of its Dot Net Platform in summer 2005 that includes .Net 2.0 framework, enhancements in Programming Languages (C#, VB.Net, C++, J#), enhancements in ASP.Net and Visual Studio 2005. In this Whats new series we will introduce and discuss these new features from the enhancements of programming languages to .net framework & visual studio 2005 IDE.