.NET news » C# C# Rss Feed

LINQ Into Microsoft's New Query Capabilities

Query features have long been a cornerstone of database applications, but with LINQ, Microsoft introduces query language features right inside of C# and VB.NET.
10 May 2006, 18:31:38   Source: LINQ Into Microsoft's New Query Capabilities   Tags: C# VB.NET

free C# Tutorial Starter Kit

The DevelopMentor C# Tutorial Starter Kit delivers a comprehensive tour of the C# language using a sequence of modules, each containing a topic, exercises, and a quiz, with both the "before" and "after" versions of each exercise which allow you to compare your coding solution to the provided solution. It uses a sophisticated, multi-project "starter kit" which includes code samples that compile, documentation, and other helpful resources that help you to work through the C# tutorial, either online or off-line, at your own pace using Visual Studio 2005.
19 Apr 2006, 05:00:00   Source: free C# Tutorial Starter Kit   Tags: C#

Using P/Invoke to Call Unmanaged APIs from Your Managed Classes

Learn how to use P/Invoke to call unmaged Win32 APIs from managed code. These sample applications show how to mute sounds, change Windows resolution, and display ballon tips from your managed code.
16 Mar 2006, 15:19:57   Source: Using P/Invoke to Call Unmanaged APIs from Your Managed...   Tags: C# VB.NET

Performance Quiz #9 : IList<T> List and array speed

A short and sweet quiz with lots of juicy discussion possibilities:

public int Sum(IList<ushort> indices)
{
int result = 0;
for (int i = 0; i < indices.Count; i++)
result += indices[i];
return result;
}

Considering only the time it takes to do the Sum (i.e. assuming we had already set up the array/list) which gives better performance and why?

// #1
ushort[] tmp = new ushort[500000]; // this doesn't count
Sum(tmp);// this is what we are timing

OR

// #2
List<ushort> tmp = new List<ushort>(500000); // this doesn't count
for (int i = 0; i < 500000; i++)tmp.Add(0); // this doesn't count
Sum(tmp); // this is what we are timing

What say you gentle readers?

9 Mar 2006, 18:31:00   Source: Performance Quiz #9 : IList<T> List and array speed   Tags: Performance C#

Publisher's Point: C-Sharpest

Exclusive online-only article!Publisher's Point E-Column: C-Sharpest

C# 2.0 just shipped with a number of interesting new features: anonymous methods, nullable objects, iterators, partial classes, generics, and others. But the innovation does not stop there! Microsoft (and Anders Hejlsberg in particular) have already allowed us a sneak peek at some of the new features that will be available in C# 3.0.

4 Dec 2005, 02:00:00   Source: Publisher's Point: C-Sharpest   Tags: C#

How to Create a Web Service in C#

Learn how to create a Web service in C#.
1 Dec 2005, 01:07:37   Source: How to Create a Web Service in C#   Tags: C# Examples Web Services

How to Write High-Performance C# Code

Writing code that runs quickly is sometimes at odds with writing code quickly. C.A.R. Hoare, computer science luminary and discoverer of the QuickSort algorithm, famously proclaimed, 'Premature optimization is the root of all evil.' The extreme programming design principle of 'You Aren't Gonna Need It' (YAGNI) argues against implementing any features, including performance optimizations, until they're needed.
12 Sep 2004, 19:00:00   Source: How to Write High-Performance C# Code   Tags: Performance C#