Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

How to add object to the ListBox as an element and display only one of the property(string) of the class

$
0
0

I have a class like following.

    public class ResponseMessage
    {
        private Int16 m_response_message_no;
        private Int16 m_message_type;
        private string m_message;
        public Int16 ResponseMessageNo
        {
            get { return m_response_message_no; }
            set { m_response_message_no = value; }
        }
        public Int16 MessageType
        {
            get { return m_message_type; }
            set { m_message_type = value; }
        }
        public string Message
        {
            get { return m_message; }
            set { m_message = value; }
        }
    }

I want to add this object to the ListBox(or any similar control) as an element and display only Message.

How to do this?


Viewing all articles
Browse latest Browse all 2535

Trending Articles



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