Browse by Tags

All Tags » C# (RSS)

Clone Detective For Visual Studio

Clone Detective is a tool that integrates with Visual Studio and uses the ConQAT ( Con tinuous Q uality A ssessment T oolkit) to analyze C# projects and search for duplicated source code. Watch the videos and see if this is the tool you were looking for...

StyleCop 4.3 Is Out

The StyleCop team announced the release of a version 4.3 of the StyleCop tool . You can get it from here . On this version there are some bug fixes, new rules and documentation. Also in this version, the list of errors and warnings goes to the Errors...

More On Another Way For Using The “using” Keyword

In the past I presented another possible use for the using keyword: as hints on LINQ . I’ve been giving some thought about this lately and refined my proposal. var q = from person in personCollection using MyEnumerableExtensions group person by person...
Posted by Paulo Morgado | 2 comment(s)
Filed under: , , , , ,

How About Property Assignment And Collection Adding Like Object And Collection Initializers In C#?

C# 3.0 introduced object and collection initializers . It is now easier to initialize objects or collections: var person = new Person { FirstName = "Paulo" , LastName = "Morgado" }; var persons = new List < Person > { new Person...
Posted by Paulo Morgado | 3 comment(s)
Filed under: , , , ,

C# And Visual Basic Generate Different Expression Trees

(This was pointed out to me by Frans Bouma and explained by Jon Skeet ) Imagine you have this set of classes: public class A { public virtual string P { get { return "A" ; } } } public class B : A { } public class C : B { public override string...
Posted by Paulo Morgado | with no comments

Microsoft Source Analysis for C# (aka StyleCop)

I’ve learned from a fellow GASP er of the release of Microsoft Source Analysis for C# (aka StyleCop) . It’s still a work in progress but it’s already very useful.

Stretching Type Inference

Note: Code in italics is not actual C# 3.0 syntax. Local Variable Type Inference C# 3.0 brought us local variable type inference mainly because of LINQ . The output of a query can vary from an IEnumerable<T> or an IQueryable<T> to a single...

TypeMock: How to Make Reflective Mocks More Natural

Like I said before , this as been on the back of my mind for a while. A while back I introduced a way to get the MethodInfo of a method in a strongly typed way using LINQ , and that's how I'm going to make Reflective Mocks more Natural . Well...

TypeMock Snippets For Visual Studio

I've just created a set of code snippets for Visual Studio for my most used features of TypeMock . Feel free to use it.

Stop Designing for Testability (by Eli Lopian)

Eli Lopian from TypeMock™ , has an article on CodeProject about the disadvantages of design for testability and how to use TypeMock™ to remove these disadvantages while keep the advantages of unit testing. I have to say that I agree with Eli: design for...

Unit Test Patterns for .NET (from TypeMock™)

There is a good set of articles about Unit Test Patterns in the TypeMock™ site: Unit-Test Patterns for .NET - Part I This article looks at patterns in unit testing and describes the main patterns found in tested .NET code. It also describes the problems...

TypeTypeConverter vs. TypeNameConverter

Some time ago I complained about the fact that a TypeConverter for Type s was missing from the .NET Framework . At the time I had search for one in the framework but only found internal or private implementations. As it turns out, the version 2.0 of the...
Posted by Paulo Morgado | 1 comment(s)
Filed under: , , , , ,

.NET Framework 2.0 Service Pack 1 and .NET Framework Service Pack 1 available as a standalone download

For those who can't (or don't want to) deploy .NET Framework 3.5, the service packs included for the 2.0 and 3.0 versions of the framework are available as standalone downloads. Microsoft .NET Framework 2.0 Service Pack 1 (x86) Microsoft .NET...

Visual Studio 2008 and .NET Framework 3.5 shipped!

Visual Studio 2008 and .NET Framework 3.5 has finally shipped. MSDN subscribers can download the final version of Visual Studio 2008 from MSDN Subscription Downloads , but anyone can get a trial version or an Express Edition . The .NET Framework 3.5 contains...

Visual Studio 2008 and .NET FX 3.5 to RTM before the end of November 2007

Today, S.Somasegar announced at TechEd Developers EMEA , amongst other things, that they the product team at Microsoft is putting the finishing touches on Visual Studio 2008 and .NET FX 3.5. They are on track to shipping these products before the end...

A new phase for the Acropolis project

The Acropolis Team has announced that Acropolis is going to enter a new phase.

Are Page Modules Still Useful In IIS7?

With IIS7 a new transfer method is available in the HttpServerUtility class . It's the TransferRequest method . What this method is intended to do is behave like the HttpResponse.Redirect method without the penalty of traveling to the client and back...

VS REGEX: Commenting Generated Assert Instructions

Visual Studio's Unit Test generator generates a call to Assert.Inconclusive but, usually generates a call to another method of the Assert class. I find that very annoying because, some times, this makes the test fail instead of being reported as inconclusive...

VS REGEX: Joining Concatenated Strings

I don't like to see constant strings being concatenated in source code. I know the compiler compiles it into a single string, but I think it sends out the wrong message. However, code generators (like Visual Studio's Unit Test generator) usually...
Posted by Paulo Morgado | with no comments

TypeMock 4.1 has been released.

The main features of this version are: Support of .NET 3.5 syntax changes Mocking automatic properties. Mocking Anonymous Types. Mocking Lambda Expressions. Verifying New Initialziers. Mocking Extension Methods. Mocking LINQ statements. Integration API...
Posted by Paulo Morgado | with no comments
More Posts Next page »