<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tag 'enumeration'</title><link>http://forums.asp.net/search/SearchResults.aspx?q=&amp;tag=enumeration&amp;orTags=0&amp;o=DateDescending</link><description>Search results matching tag 'enumeration'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Custom DataBinding</title><link>http://forums.asp.net/thread/3356819.aspx</link><pubDate>Wed, 19 Aug 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3356819</guid><dc:creator>net fan</dc:creator><description>&lt;p&gt;Thank you very much Allen. It&amp;#39;s worked fine.&lt;/p&gt;&lt;p&gt;I&amp;#39;ve made some small modifications on your code to match what I needed at the beginning and I&amp;#39;m listing it belwo for the benefit of other users.&lt;/p&gt;&lt;p&gt;Thanks again.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="c-sharp"&gt;using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;

namespace ConsoleApplication1
{

    public class MyData
    {
        public string StrProperty { get; set; }
        public bool BoolProperty { get; set; }
        public int IntProperty { get; set; }
    }

    public class MyDataList : List&amp;lt;MyData&amp;gt;
    {

    }

    public class MyControl
    {
        public object DataSourceObject;

        public void DataBind()
        {
            IEnumerable array = DataSourceObject as IEnumerable;

            foreach (var item in array)
            {
                Console.WriteLine(string.Format(&amp;quot;========{0}========&amp;quot;, item.ToString()));

                //use reflection to get all properties of item.
                //To test only extract strimg, bool, int properties.
                foreach (PropertyInfo pi in item.GetType().GetProperties())
                {
                    if (pi.PropertyType == typeof(string) ||
                        pi.PropertyType == typeof(int) ||
                        pi.PropertyType == typeof(bool))
                    {
                        Console.WriteLine(string.Format(&amp;quot;{0}: {1}&amp;quot;
                            , pi.Name, pi.GetValue(item, null).ToString()));

                    }
                }
            }

        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            MyDataList datasource = new MyDataList()
            {
                new MyData { BoolProperty = false, StrProperty=&amp;quot;test&amp;quot;, IntProperty=11 },
                new MyData { BoolProperty = true, StrProperty=&amp;quot;test number 2&amp;quot;, IntProperty=25 }
            };


            MyControl ctrl = new MyControl();
            ctrl.DataSourceObject = datasource;
            ctrl.DataBind();

            Console.ReadLine();
        }
    }

}
&lt;/pre&gt;&lt;br /&gt; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Custom DataBinding</title><link>http://forums.asp.net/thread/3356817.aspx</link><pubDate>Wed, 19 Aug 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3356817</guid><dc:creator>net fan</dc:creator><description>&lt;p&gt;Thank you very much Allen. It&amp;#39;s worked fine.&lt;/p&gt;&lt;p&gt;I&amp;#39;ve made some small modifications on your code to match what I needed at the beginning and I&amp;#39;m listing it belwo for the benefit of other users.&lt;/p&gt;&lt;p&gt;Thanks again.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="c-sharp"&gt;using System;&lt;br /&gt;using System.Collections;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Reflection;&lt;br /&gt;&lt;br /&gt;namespace ConsoleApplication1&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    public class MyData&lt;br /&gt;    {&lt;br /&gt;        public string StrProperty { get; set; }&lt;br /&gt;        public bool BoolProperty { get; set; }&lt;br /&gt;        public int IntProperty { get; set; }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public class MyDataList : List&amp;lt;MyData&amp;gt;&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public class MyControl&lt;br /&gt;    {&lt;br /&gt;        public object DataSourceObject;&lt;br /&gt;&lt;br /&gt;        public void DataBind()&lt;br /&gt;        {&lt;br /&gt;            IEnumerable array = DataSourceObject as IEnumerable;&lt;br /&gt;&lt;br /&gt;            foreach (var item in array)&lt;br /&gt;            {&lt;br /&gt;                Console.WriteLine(string.Format(&amp;quot;========{0}========&amp;quot;, item.ToString()));&lt;br /&gt;&lt;br /&gt;                //use reflection to get all properties of item.&lt;br /&gt;                //To test only extract strimg, bool, int properties.&lt;br /&gt;                foreach (PropertyInfo pi in item.GetType().GetProperties())&lt;br /&gt;                {&lt;br /&gt;                    if (pi.PropertyType == typeof(string) ||&lt;br /&gt;                        pi.PropertyType == typeof(int) ||&lt;br /&gt;                        pi.PropertyType == typeof(bool))&lt;br /&gt;                    {&lt;br /&gt;                        Console.WriteLine(string.Format(&amp;quot;{0}: {1}&amp;quot;&lt;br /&gt;                            , pi.Name, pi.GetValue(item, null).ToString()));&lt;br /&gt;&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    class Program&lt;br /&gt;    {&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;            MyDataList datasource = new MyDataList()&lt;br /&gt;            {&lt;br /&gt;                new MyData { BoolProperty = false, StrProperty=&amp;quot;test&amp;quot;, IntProperty=11 },&lt;br /&gt;                new MyData { BoolProperty = true, StrProperty=&amp;quot;test number 2&amp;quot;, IntProperty=25 }&lt;br /&gt;            };&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            MyControl ctrl = new MyControl();&lt;br /&gt;            ctrl.DataSourceObject = datasource;&lt;br /&gt;            ctrl.DataBind();&lt;br /&gt;&lt;br /&gt;            Console.ReadLine();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Enterprise Library 4.1 Cache and enumeration.  Can this be done?</title><link>http://forums.asp.net/thread/3179463.aspx</link><pubDate>Thu, 21 May 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3179463</guid><dc:creator>skydiverMN</dc:creator><description>&lt;p&gt;I&amp;#39;m working with a project where users that login might open up another tab (IE 7, FF, etc.) and login again as another user.&amp;nbsp; My original cache issue was not having cached keys overwritten during this double login scenario.&amp;nbsp; For this I&amp;#39;m going to concatenate the userID when creating a new cache item.&amp;nbsp; This creates another issue.&amp;nbsp; How can I only remove that items with one specific user?&amp;nbsp; There doesn&amp;#39;t appear to be any way to enumerate through a list.&amp;nbsp; The CacheItem exists, but there&amp;#39;s no Cache.Items (or similar) to enumerate through using a ForEach.&amp;nbsp; Also, after instantiating the ICacheManager interface I tried to just look for an index.&amp;nbsp; See below:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;private ICacheManager appCache&lt;/p&gt;
&lt;p&gt;(in some public method....)&lt;br /&gt;typing appCache[&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;---- intellisense just pops up that it&amp;#39;s looking for&amp;nbsp;a string key.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I also tried to inherit from the IEnumerate&amp;lt;&amp;gt;, but I&amp;#39;m not sure&amp;nbsp;exactly how this&amp;#39;ll work.&amp;nbsp; &amp;nbsp;Is there a way to extend the EntLib cache to enumerate through?&lt;/p&gt;</description></item><item><title>Re: Cache for multiple users in same browser session</title><link>http://forums.asp.net/thread/3179390.aspx</link><pubDate>Thu, 21 May 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3179390</guid><dc:creator>skydiverMN</dc:creator><description>&lt;p&gt;Another site told me to just concatenate the userID to the front of the cache ID.&amp;nbsp; I thought of this too, but felt that this was more of a hack than good coding.&amp;nbsp; Seeing&amp;nbsp;I haven&amp;#39;t heard any other ideas this will probably&amp;nbsp;be my method.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;This still doesn&amp;#39;t solve the issue of deleting only a specific UserID&amp;#39;s&amp;nbsp;items in cache.&amp;nbsp; Using FLUSH will delete everything.&lt;br /&gt;Anyone know if there&amp;#39;s a way to incorporate enumeration in the enterprise library cache?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks.&lt;/p&gt;</description></item><item><title>Is [Flags]Enumeration the propper solution</title><link>http://forums.asp.net/thread/3173315.aspx</link><pubDate>Tue, 19 May 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3173315</guid><dc:creator>trondaron</dc:creator><description>&lt;p&gt;I am planning on have an unknown number of permissions. My intial estimate is roughly 20-30. These permissions will cover a variety of things related to whether a user can create/edit/view various items reports/limits/data etc.&lt;/p&gt;&lt;p&gt;&amp;nbsp;The questions is what is the best practice for this scenerio?&lt;/p&gt;&lt;p&gt;My thoughts below feel free to ignore and just make suggestions:&lt;/p&gt;&lt;p&gt;- A Permissions class that controls the whole mess and can be used in
subsequent User Derivative classes. Then checked using something like
User.Permissions.ReportsView &lt;br /&gt;&lt;/p&gt;&lt;p&gt;- A single [Flag] type enumeration with all the permissions that can be stored in a hex field in a database&lt;/p&gt;&lt;p&gt;- A system of [Flag] type enumerations; so that a user will be flagged for report permissions and then have those permissions defined using a second enumeration. These will be stored in set of database fields mirroring the same structure.&lt;/p&gt;</description></item><item><title>Attempt to Remove Items from Dictionary Object gets Enumeration Error</title><link>http://forums.asp.net/thread/2165164.aspx</link><pubDate>Mon, 11 Feb 2008 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2165164</guid><dc:creator>John Happy</dc:creator><description>&lt;p&gt;My goal is to reduce the number of key / value pairs in a dictionary object by comparing the keys in the dictionary object to&amp;nbsp;words contained in an array and removing the key / value pairs where the key (a string) is equal to one of the strings in my array.&lt;/p&gt;
&lt;p&gt;In the code below, AssignedNumbers represents the Dictionary object. The keys are&amp;nbsp;strings, the values are integers ...&amp;nbsp;it could look like this:&lt;/p&gt;
&lt;p&gt;(&amp;quot;pair&amp;quot; , 0)&lt;/p&gt;
&lt;p&gt;(&amp;quot;of&amp;quot; , 1)&lt;/p&gt;
&lt;p&gt;(&amp;quot;shoes&amp;quot; , 2)&lt;/p&gt;
&lt;p&gt;The one-dimensional array&amp;nbsp;named RejectedWordsArray, might contain the strings &amp;quot;a&amp;quot; and &amp;quot;of&amp;quot;.&lt;/p&gt;
&lt;p&gt;Using the above scenario, I want to compare each word in the RejectedWordsArray against the keys in the AssignedNumbers dictionary and remove those dictionary key / value pairs where the RejectedWordsArray value equals a dictionary key.&amp;nbsp; If the array values and dictionary keys were as stated above, the word &amp;quot;of&amp;quot; would be found as common to the array and dictionary&amp;nbsp;and I would want the key / value pair&amp;nbsp;(&amp;quot;of&amp;quot;, 1) removed from the dictionary&lt;/p&gt;
&lt;p&gt;Following is the code that does not work:&lt;/p&gt;&lt;font size="2"&gt;&amp;lt;%&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;@&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;Page&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;Language&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;VB&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;Debug&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;True&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;%&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&amp;lt;%&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;@&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;Import&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;Namespace&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;System.Collections.Generic&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; %&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&amp;#39; To get the keys alone, use the Keys property.&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; keyColl &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; Dictionary(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Of&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Integer&lt;/font&gt;&lt;font size="2"&gt;).KeyCollection = AssignedNumbers.Keys&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/p&gt;&lt;font color="#008000" size="2"&gt;&amp;#39;&amp;#39; ContainsKey can be used to test keys before inserting / removing them.&lt;/font&gt;&lt;font color="#008000" size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;For&lt;/font&gt;&lt;font size="2"&gt; f = 0 &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;To&lt;/font&gt;&lt;font size="2"&gt; UBound(RejectedWordsArray)&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;For&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Each&lt;/font&gt;&lt;font size="2"&gt; g &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;In&lt;/font&gt;&lt;font size="2"&gt; keyColl&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/font&gt;&lt;font size="2"&gt; AssignedNumbers.ContainsKey(RejectedWordsArray(f)) &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Then&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;AssignedNumbers.Remove(g)&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Next&lt;/font&gt;&lt;font size="2"&gt; g&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Next&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;*** End of Code *******************************************************************************************************&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Running the above code generates the following error message: &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Collection was modified; enumeration operation may not execute.&lt;/em&gt; &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;&lt;b&gt;Description: &lt;/b&gt;An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Exception Details: &lt;/b&gt;System.InvalidOperationException: Collection was modified; enumeration operation may not execute.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Source Error:&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;
&lt;table class="" bgcolor="#ffffcc"&gt;

&lt;tr&gt;
&lt;td class=""&gt;&lt;code&gt;&lt;pre&gt;Line 280:                    AssignedNumbers.Remove(g)
Line 281:                End If
&lt;font color="red"&gt;Line 282:            Next g
&lt;/font&gt;Line 283:        Next
Line 284:        &lt;/pre&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;Please&amp;nbsp;help me&amp;nbsp;build the code that will successfully remove the qualified dictionary key / value pairs?&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Crystal Report with oracle 9i Stored Procedure </title><link>http://forums.asp.net/thread/2109678.aspx</link><pubDate>Tue, 15 Jan 2008 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2109678</guid><dc:creator>akhilesh.saini</dc:creator><description>&lt;p&gt;Hi every one &lt;/p&gt;
&lt;p&gt;I have created a stored procedure in oracle 9i . This procedure returns a Reference Cursor because i want to return more than 1 values from procedure on the basis of given parameters . Then i created a report using crystal report 9i and using the Oracle Server Driver i created the report using that procedure . Now when i refresh the report in the crystal report it works fine . Upto this the work is fine . But now when i try to call the report from&amp;nbsp;ASP.Net using Crystal report Object it gives me error &amp;quot;Fail to load database information&amp;quot;&amp;nbsp;I am unable to resolve this issue . Please Have&amp;nbsp; some time . &lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Akhilesh Saini&lt;/p&gt;
&lt;p&gt;NET Web Developer&lt;/p&gt;</description></item><item><title>Re: Enumeraion</title><link>http://forums.asp.net/thread/1885525.aspx</link><pubDate>Thu, 30 Aug 2007 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1885525</guid><dc:creator>ManojSharma</dc:creator><description>&lt;p&gt;&lt;font face="verdana,geneva" color="#990000"&gt;The statement is correct.&amp;nbsp; In the sense, that an enumeration is a list of constants.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="verdana,geneva" color="#990000"&gt;Actually, an Enumeration is an Array of Constants.&amp;nbsp; But there are&amp;nbsp;significant differences that you need to understand.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="verdana,geneva" color="#990000"&gt;First of all, an enumeration is different from a constant because it is available at run-time.&amp;nbsp; The language compiler replaces the Constant during the compilation process, but the enumeration is packed into the assembly, and is available at run-time.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="verdana,geneva" color="#990000"&gt;However, an enumeration has multiple values, hence behaves like an array of constants.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="verdana,geneva" color="#990000"&gt;An enumeration is different from an array, in the sense that you can change the value of any of the&amp;nbsp;elements in&amp;nbsp;the array, but you cannot do the same.&amp;nbsp; Also, the fact that an array is typically bound to the number of ranks (dimensions).&amp;nbsp; But an enumeration is a key-value pair based constant array, where the key is always an integer, and the value is returned as a string ( using the ToString() method inherited from System.Object ).&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="verdana,geneva" color="#990000"&gt;Hope the above explanation helps you in understanding the differences.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="verdana,geneva" color="#990000"&gt;Happy coding!&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="verdana,geneva" color="#990000"&gt;MANOJ KUMAR SHARMA.&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: Collection was modified; enumeration operation may not execute</title><link>http://forums.asp.net/thread/1861100.aspx</link><pubDate>Thu, 16 Aug 2007 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1861100</guid><dc:creator>d4dennis@inspir3</dc:creator><description>&lt;p&gt;Hi There,&lt;/p&gt;
&lt;p&gt;If you wish to add/edit/delete item from &amp;lt;list&amp;gt; best to use following to prevent modified enumeration collection.&lt;/p&gt;
&lt;p&gt;For ( int i = 0; i &amp;lt; tabs.Count; i++ )&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;tabs[i] ......&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Hope it helps!&lt;/p&gt;</description></item></channel></rss>