|
Project
|
ReSharper
|
|
Priority
|
Normal |
|
Type
|
Bug |
|
Fix versions
|
4.5, 4.5.1, 5.0 |
|
State
|
Fixed |
|
Assignee
|
Sergey Shkredov |
|
Subsystem
|
No subsystem |
|
Affected versions
|
No Affected versions |
|
Fixed in build
|
No Fixed in build |
public class Test
{
public static void Do()
{
DictionaryEvents<string, string> dict = new DictionaryEvents<string, string>();
CollectionEvents<string> coll = new CollectionEvents<string>();
dict.BeforeAddRemove += delegate { throw new InvalidOperationException(string.Format("Whoops!")); };
coll.BeforeAddRemove += delegate { throw new InvalidOperationException(string.Format("Whoops!")); };
}
}
public class Test
{
public static void Do()
{
DictionaryEvents<string, string> dict = new DictionaryEvents<string, string>();
CollectionEvents<string> coll = new CollectionEvents<string>();
EventHandler<BeforeAddRemoveEventArgs<KeyValuePair<string, string>>> handler = delegate { throw new InvalidOperationException(string.Format("Whoops!")); };
dict.BeforeAddRemove += handler;
coll.BeforeAddRemove += handler;
}
}