Click here to Skip to main content
15,906,463 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
public class clsListingDetails
        private string _SystemName;
        public string SystemName
            get { return _SystemName; }
            set { _SystemName = value; }

        private string _MaxCharacters;
        public string MaxCharacters
            get { return _MaxCharacters; }
            set { _MaxCharacters = value; }

public class User
public Dictionary<string, ArrayList> colListingDetails { get; set; }

In above colListingScreenReportPrintDetails we storing clsListingDetails properties. But it is set according to user type. For some user it is not set but I can I check whether or not is set..??
Updated 10-Sep-15 1:18am
F-ES Sitecore 10-Sep-15 7:00am    
Check if it's null?
Matt T Heffron 10-Sep-15 13:28pm    
Side notes:
1. ArrayList is pretty much obsolete and has been replaced with the type-safe List<T> (which in your case would be List<clsListingDetails>)
2. Why is MaxCharacters a string? Its name implies that it is an integer. Use numbers AS numbers and only convert to/from string representations for user interaction, and, IF NECESSARY, persistence.
Kailas_ 11-Sep-15 1:34am    
Thanks Matt T Heffron for suggestion..!

1 solution

Check for the null value like below

if ( clsListingDetails.MaxCharacters == null )

Share this answer
Kailas_ 10-Sep-15 7:38am    
Not exact But I get Idea, I can't do that directly instead I have check like
User.colListingDetails != null and its works as I stores "clsListingDetails" list in Dictionary, anyway thanks..
Abhishek Kumar Goswami 10-Sep-15 7:51am    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900