How can i see the code inside of ForEach<T>(T[] array, Action<T> action)?
Not the definition only or how to use but the code inside of this method?
I just need to see how to change the parameter type when i put T as a type passed on that method.
Example:
Array.ForEach<string>(string[] array, Action<string> action); Array.ForEach<int>(int[] array, Action<int> action); Array.ForEach<whateverTypeHere>(whateverTypeHere[] array, Action<whateverTypeHere> action);
If i put any type inside <> the parameters also will change. How to do it anyway? 🙂
if i create a new instance of this class, it will show like
if you pass the type like int or string, automatically the compiler will infer the type of your property.
You have to try practicing it, then you will be able to understand