Quantcast
Viewing all articles
Browse latest Browse all 42279

3.0/LINQ How to create a colletion of properties in a C# class

Hello folks,

Happy New Year!!!

I have a class that has couple of properties.

Can I have a property in that class that can be a collection. Like say the MarketData. can I have a property say "FailedCurves" . It is a string property. But only thing is, this property is an ArrayList or Dictionary object that can have multiple string items in it.

How can I do that in C#? Am I thinking correct?

Thanks much

Code:

public class MarketData
    {
        #region "Private Data Members"
        private int _countAdvanceCurve;     
        private int _countAdvancesSBCAgencyCurve;
        private int _countAdvancesSBCAAACurve;
        private int _countFhlbsfTreasuryCurve;
        private int _countDNCOCurve; 
        #endregion "Private Data Members"
        #region "Public Data Members"
        public int CountAdvanceCurve
        {
            get { return _countAdvanceCurve; }
            set { _countAdvanceCurve = value; }
        }
}


Viewing all articles
Browse latest Browse all 42279

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>