Click here to Skip to main content
15,886,049 members
Articles / Desktop Programming / WPF

Modeling M-V-VM

Rate me:
Please Sign up or sign in to vote.
3.71/5 (8 votes)
5 Jun 2009CPOL2 min read 26.9K   312   23  
An article which tries to present an approach for decoupling M-V-VM View Model objects
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WorldDataLib.Model
{
    public class Country
    {
        #region Members

        string m_strName;
        CurrenciesEnum m_Currency;

        List<City> m_Cities;        

        #endregion

        #region Properties

        public string Name
        {
            get { return m_strName; }
            set { m_strName = value; }
        }

        public CurrenciesEnum Currency
        {
            get { return m_Currency; }
            set { m_Currency = value; }
        }

        public List<City> Cities
        {
            get { return m_Cities; }
            set { m_Cities = value; }
        }

        #endregion

        #region Methods

        #region Ctor

        public Country()
        {
            m_Cities = new List<City>();
        }

        #endregion

        #endregion
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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


Written By
Software Developer
Israel Israel
Software Developer in a promising Clean-Tech company

Comments and Discussions