JabbaTheNut
Programmer
I am looking for a good way to handle null integer values in a class. I need to develop a class that will extract data from several tables which can contain null values and provide the results in a set of property values.
For example...
##################################
private int x = (int) [database item which can be null];
public int Y
{
get
{
return x;
}
}
##################################
I understand that I can't convert a null value to integer (or set an integer variable to null). This being the case, what is the best strategy for this situation?
Game Over, Man!
For example...
##################################
private int x = (int) [database item which can be null];
public int Y
{
get
{
return x;
}
}
##################################
I understand that I can't convert a null value to integer (or set an integer variable to null). This being the case, what is the best strategy for this situation?
Game Over, Man!