Hello all
I have some list of objects , and when this list is null or its count is =0 I want to create some thing , but when the list is null I get null reference exception the code is as the following:
List<Registry> lstInstalledProducts = new List<Registry>();
lstInstalledProducts =objInstalledProducts.GetInstalledProducts();
if (lstInstalledProducts.Count==0 ||lstInstalledProducts==null)
{
//do some thing
}
please if any body get what's the error and can help me in solving it please send me or tell me about some url may help me in solving it
regards
Mostafa