Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var form = SqlDB.GetTable<ORMB.Form, CDB>()
- .Where(f => f.FormID == formID)
- .Single();
- System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
- at System.Collections.Generic.List`1.Add(T item)
- at System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user)
- at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
- at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
- at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
- at System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression)
- at System.Linq.Queryable.Single[TSource](IQueryable`1 source)
- at GetForm.Page_Load(Object sender, EventArgs e)
- public void Add(T item)
- {
- if (this._size == this._items.Length)
- {
- this.EnsureCapacity(this._size + 1);
- }
- this._items[this._size++] = item;
- this._version++;
- }
- T1: Add(x)
- T2: Add(y)
- T1: Since _size == _items.Length: EnsureCapacity(_size + 1)
- T2: Since _size > _items.Length: _items[_size++] = item;
- T1: _items[size++] = item <- OutOfRangeException since T2 didn't increase the capacity as needed
Add Comment
Please, Sign In to add comment