I've just had to write a string reverse function in C# 2.0 (i.e. LINQ not available) and came up with this:
public string Reverse(string text)
{
char[] cArray = text.ToCharArray();
string reverse = String.Empty;
for (int i = cArray.Length - 1; …
One may not always know the Type of an object at compile-time, but may need to create an instance of the Type.
How do you get a new object instance from a Type?
I have a DetailsView with a TextBox
and I want the input data be saved always with the FIRST LETTER IN CAPITAL.
Example:
"red" --> "Red"
"red house" --> " Red house"
How can I achieve this maximizing performance?
…