OK, I just came up with something evil. But, I like it because it saves doing that extra assignment every time
StringBuilder qs = new StringBuilder();
bool firstKey = true;
foreach (KeyValuePair kvp in param)
{
qs.AppendFormat("{0}{1}={2}", (firstKey & !(firstKey = false) ) ? String.Empty : "&", kvp.Key, kvp.Value);
}
Why no "??=" operator in C#? Anyway, it's not like I can Google it. Maybe there is one, or some reason there isn't.
{
if (Checked)
Checked = false;
}
One thing I just absolutely do not understand is using properties vs public members. If all you're doing is { get; set; }, then how is that different from just using a public variable? Because it makes you feel better, like you're not exposing a public variable? Maybe there's some difference I just don't recognize or know about. But, whatever.
Drives me crazy when people create objects just to use them once, and don't even change the value of it that time. Especially when the thing goes out of scope immediately afterwards.
For example.
{
string message = "Error: user is dumb";
Textbox1.Text = message;
}
return;
WHY DO THIS. WHY. IS IT TO HASTEN MY INEVITABLE ANEURYSM. IS IT. BECAUSE THAT'S WHAT IT SEEMS LIKE. JUST SHOOT ME IN THE FACE INSTEAD. PLEASE. AT LEAST THAT'S MORE HONEST.