O'Reilly logo

Software Testing using Visual Studio 2012 by Satheesh Kumar. N, Subashni. S

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Unit Tests and Generics

Generics in .NET Framework help us to design classes and methods without any specific parameter types, allowing us to realize type safety at compile time. It means we can continue working with the class in a type-safe way, but don't have to force it to be of any specific type. Generics help us to re-use code and increase performance. Generics are mostly used in place of collections such as ArrayList, Linked List, Stacks, Queues, and other collections. This is because the collections can hold any type of items, for example, an array list can be a list of integers or it can be a list of strings. The following is an example of a generic method, which just accepts two generic values and copies the first one into the second ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required