> As a new .net generics learner could some one care to explain what is
> the difference when i declare the function such as
[quoted text clipped - 9 lines]
> customAction("rohit");
> }
Well, the latter is trying to create a generic method with a type
parameter called String. It's as if you'd written:
void function<T>(Action<T> customAction)
{
customAction("rohit");
}
The compiler is complaining because it can't convert from a string to a
T, and customAction takes a T not a string.
I suspect this isn't what you meant to do.
What were you trying to achieve by adding the <String> part?

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk