Colecciones de solo lectura

Ottobre 29th, 2007

Description: Como hacer que una coleccion sea de solo lectura

Link: http://www.codekeep.net/snippets/b2db39e3-bafd-4f1a-8974-137aed651cc7.aspx

public class FiltroSql
{
    private readonly List<CondicionSql> _condiciones=new List<CondicionSql>();

        /// <summary>
        /// Gets the condiones.
        /// </summary>
        /// <value>The condiones.</value>
        public ReadOnlyCollection<CondicionSql> Condiones
        {
            get { return _condiciones.AsReadOnly(); }
        }
}

  • .NET
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.