Reputation: 38180
Following discuss Problem to pass the result to the caller for asynchronous httpWebRequest I tried to created an event of type Action
public event Action<string> ResponseResult;
but Silverlight refuses event keyword: it says expect class, delegate, ...
Upvotes: 0
Views: 267
Reputation: 13353
You are defining the event in the wrong place. If you have your Helper class (reference the original post) then you need to declare the event inside this class:
public class Helper
{
public event Action<string> ResponseResult;
// rest of code...
}
Upvotes: 1
Reputation: 17405
C# is C#, whether it's against Silverlight or the .NET Framework that you're building.
My guess is that you're trying to define an event outside of the scope of a class.
Upvotes: 1