Content deleted Content added
→Code examples: Modified the code samples to correct errors and make them easier to read and understand |
→Code examples: Corrected code example where a null return value would have caused the casting to crash |
||
Line 59:
{
// Attempt to retrieve the user data from the cache:
dataType data = null;
if (
data = (dataType)dataObject;
else
{
// If it doesn't exist in the cache, retrieve it from the database:
data = GetUserDataFromDatabase("SELECT * FROM users WHERE userid = @userid", userid);
|