Thursday, January 2, 2014

Strong vs Weak Typing

When using a DataReader to retrieve data, the developer can choose to read field values in strongly typed manner ( example: myReader.GetString(12) ) or a weakly typed manner, returning then as System.Objects ( example: myReader.GetValue(12) ). Both approaches have their pros and cons.

Using the strongly typed retrieval methods can be more cumbersome, especially without specific knowledge of the underlying data.

No comments: