Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Find()

virtual ? EventDescriptor System.ComponentModel.EventDescriptorCollection.Find ( string name,
bool ignoreCase )
inlinevirtual

Definition at line 214 of file EventDescriptorCollection.cs.

215 {
216 EventDescriptor result = null;
217 if (ignoreCase)
218 {
219 for (int i = 0; i < Count; i++)
220 {
221 if (string.Equals(_events[i].Name, name, StringComparison.OrdinalIgnoreCase))
222 {
223 result = _events[i];
224 break;
225 }
226 }
227 }
228 else
229 {
230 for (int j = 0; j < Count; j++)
231 {
232 if (string.Equals(_events[j].Name, name, StringComparison.Ordinal))
233 {
234 result = _events[j];
235 break;
236 }
237 }
238 }
239 return result;
240 }

References System.ComponentModel.EventDescriptorCollection._events, System.ComponentModel.EventDescriptorCollection.Count, and System.Name.