Click here to Skip to main content
15,886,199 members

Comments by Pantelis Chatzinikolis (Top 9 by date)

Pantelis Chatzinikolis 4-Jan-12 15:10pm View    
Sorry, either it wasn't there when I wrote my comment or I missed it. Great answer.
Pantelis Chatzinikolis 4-Jan-12 14:24pm View    
Still unrelated. Are you talking about sharing the same object between threads or different instances of the object? Either one, it's still not related to inheritance. Threading issue are generally Run-Time issue and inheritance is a design time issue.
Pantelis Chatzinikolis 4-Jan-12 14:18pm View    
First, I would strongly recommend that you switch to DateTime.TryParse. That won't fix your issue but it's a better method to use. Can you post the string you're trying to convert? Furthermore make sure it doesn't equal DBNull.
Pantelis Chatzinikolis 3-Jan-12 17:09pm View    
I don't think you can do a switch on .GetType().

foreach( Control ctl in Controls )
{
if (ctl.GetType() == typeof(TextBox))
(ctl as TextBox).Text = string.Empty;

}
Pantelis Chatzinikolis 3-Jan-12 14:30pm View    
You can also use Enums for the values and see this article on loading them to a combo box http://social.technet.microsoft.com/wiki/contents/articles/6314.aspx