Articles tagged c#

07 March 2016
07 March 2016

The Zen of Code Reviews: Review As If You Own the Code

0
27
A code review is a serious business; an essential part of development. Whoever signs off on a code review agrees, essentially, that they would be able to support it in the future, should the original author of the code be unavailable to do it. Review code with the energy you'd use if you owned the code. Michael Sorens runs through the principles of reviewing C# code.… Read more
19 February 2016
19 February 2016

Using C# to Create PowerShell Cmdlets: The Basics

0
63
Although PowerShell Cmdlets are usually written in PowerShell, there are occasions when the level of integration with existing C# or VB libraries is awkward to achieve with PowerShell. Yes, you can write Cmdlets in C# perfectly easily, but until now it has been tiresome to discover how. Now Michael Sorens shows you the simple route to writing effective C# Cmdlets.… Read more
30 November 2015
30 November 2015

What’s New in C# 6

0
96
The C# language itself has changed little in version 6, the main importance of the release being the introduction of the Roslyn .NET Compiler Platform. However the New features and improvements that have been made to C# are welcome because they are aimed at aiding productivity. Paulo Morgado explains what they are, and how to use them.… Read more
17 November 2015
17 November 2015

Documenting Your PowerShell Binary Cmdlets

0
8
Whereas it is easy to provide inline documentation for a normal scripted PowerShell cmdlet or function so as  to provide comprehensive help at the command-line or IDE, the same isn't true of binary cmdlets written in C#. At last, there is an open-source utility to assist with this that is being actively maintained and updated. At last, binary cmdlets need no longer be the poor cousins of scripted cmdlets in their documentation… Read more
30 June 2014
30 June 2014

Developing a Custom SSIS Source Component

0
67
SSIS was designed to be extensible. Although you can create tasks that will take data from a wide variety of sources, transform the data is a number of ways and write the results a wide choice of destinations, using the components provided, there will always be occasions when you need to customise your own SSIS component. Yes, it is time to hone up your C# skills and cut some code, as Saurabh explains.… Read more
14 January 2014
14 January 2014

Generating Test Data in TSQL

To test SQL, you need test data. There are usually many reasons why you can't use production data. Although it is usually enough to use a utility to generate test data, sometimes your requirements will compel you to resort to code to supplement this. Hugo shows how he used SQL and C# to generate large volumes of test data involving related columns and complex distributions.… Read more
11 July 2013
11 July 2013

Fluent Code in C#

0
50
In LINQ, the 'fluent' method syntax flows logically and intuitively, and allows them to be combined simply, because each method returns the appropriate type of object for the next. Can this fluent technique be extended as an API style to make it easier to develop C# team-based applications for enterprises? … Read more
17 September 2012
17 September 2012

Bertrand Meyer: Geek of the Week

Bertrand Meyer, the author of 'Object-oriented Software Construction', renowned teacher, and designer of the Eiffel programming language, believes in simple elegant computer languages. Java, C# and Python all owe much to his pioneering work with Eiffel. He was also deeply involved with .NET from the outset. … Read more
15 May 2012
15 May 2012

C# Async: What is it, and how does it work?

0
28
The biggest new feature in C#5 is Async, and its associated Await (contextual) keyword. Anybody who is faced with creating Metro applications for Windows 8 is having to tackle the very different mindset of Async Programming. Clive explains what is happening under the covers and how one can investigate, using .NET Reflector.… Read more
08 March 2012
08 March 2012

On Writing Unit Tests for C#

0
54
Is it realistic to keep to principles of 'Test-First' and 100% coverage for unit tests when in the heat of developing commercial C# applications? Does rigorous unit-testing lead naturally to good design by enforcing testability, low coupling and high cohesion? Patrick Smacchia gives his opinion based on hard-won experience. … Read more
24 August 2011
24 August 2011

Designing C# Software With Interfaces

0
380
The best way to understand how interfaces improve software design is to see a familiar problem solved using interfaces. First, take a tightly-coupled system design without interfaces, spot its deficiencies and then walk-through a solution of the problem with a design using interfaces.… Read more
21 April 2011
21 April 2011

Eric Sink: Geek of the Week

Eric Sink became well-known for his work with the Spyglass browser, which was acquired by Microsoft and morphed into Internet Explorer. Since then, he has succeeded at the difficult double-act of combining programming and the software business. He is living proof that it is possible to master both skills.… Read more
04 December 2010
04 December 2010

Dynamic Language Integration in a C# World

0
89
.NET 4.0 introduced the Dynamic keyword in C#4.0, making it simple to have your .NET code smoothly interact with dynamic languages. To find out just how easy it was, Zenon Ochal used C# and IronPython to build a very efficient mathematical expression plotter in double-quick time.… Read more
04 November 2010
04 November 2010

The New Features in C#4.0

0
196
The co-evolution of Visual Basic and C# is increasingly going to bring the feature-set of those languages closer together. So, having walked us through the new language enhancements available in VB 2010, Hima Vejella now completes the picture by walking us through the new features in C#4.0.… Read more
28 October 2010
28 October 2010

Defensive Error Handling

TRY...CATCH error handling in SQL Server has certain limitations and inconsistencies that will trap the unwary developer, used to the more feature-rich error handling of client-side languages such as C# and Java. In this article, abstracted from his excellent new book, Defensive Database Programming with SQL Server, Alex Kuznetsov offers a simple, robust approach to checking and handling errors in SQL Server, with client-side error handling used to enforce what is done on the server.… Read more