When should you use the as keyword in C#

Use as when it’s valid for an object not to be of the type that you want, and you want to act differently if it is. For example, in somewhat pseudo-code: foreach (Control control in foo) { // Do something with every control… ContainerControl container = control as ContainerControl; if (container != null) { ApplyToChildren(container); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)