Tuesday 28 May 2013

What are Generics in C#?

Generics is the implementation of parametric polymorphism. Using parametric polymorphism, a method or data type can be written generically so that it can deal equally well with objects of various types. It is a way to make a language more expressible, while still maintaining full static type-safety.




Why use generics?

There are mainly two reasons to use generics. These are:
  • Performance – Collections that store objects use Boxing and Unboxing on data types. This uses a significant amount of overhead, which can give a performance hit. By using generics instead, this performance hit is removed.
  • Type safety – There is no strong type information at compile time as to what is stored in the collection.

Wednesday 22 May 2013

How to make the text or word blink?

You can use <Blink></Blink> tag in HTML to make the word or text blink but in is not supported in all the browser.

If you want the blink to work, you will have to write some javascript code to accomplish that by turning on and off the visibility of the element with setInterval.

	

And then the word to be blinked should be as follow:
Hi, I am blinking
Hi, I am blinking