File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
src/NHibernate/Collection/Generic/SetHelpers Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -120,16 +120,10 @@ void ICollection.CopyTo(Array array, int index)
120
120
return ;
121
121
}
122
122
123
- if ( array . GetType ( ) . GetElementType ( ) . IsAssignableFrom ( typeof ( T ) ) )
124
- {
125
- if ( _hasNull )
126
- array . SetValue ( default ( T ) , index ) ;
127
- ICollection keysCollection = _values . Keys ;
128
- keysCollection . CopyTo ( array , index + ( _hasNull ? 1 : 0 ) ) ;
129
- return ;
130
- }
131
-
132
- throw new ArgumentException ( $ "Array must be of type { typeof ( T [ ] ) } .", nameof ( array ) ) ;
123
+ if ( _hasNull )
124
+ array . SetValue ( default ( T ) , index ) ;
125
+ ICollection keysCollection = _values . Keys ;
126
+ keysCollection . CopyTo ( array , index + ( _hasNull ? 1 : 0 ) ) ;
133
127
}
134
128
135
129
public int Count => _values . Count + ( _hasNull ? 1 : 0 ) ;
You can’t perform that action at this time.
0 commit comments