I have this class and internal class as part of a namespace, like this (Just removed and replaced some code and namespace declarations:
namespace X.Y.MessageHandlers.AsxActivity
{
public class AsxActivityAliveEventMessageHandler : IHandleMessages<AsxActivityAliveEvent>
{
private const double INTERVAL = 10000;
public static bool AsxConnected { get; set; }
private static Dictionary<String, TagTimer> _connectionTimers = new Dictionary<string, TagTimer>();
public void Handle(AsxActivityAliveEvent message)
{
...
}
void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
...
}
static void NotifyClients(AsxActivityAliveEvent message)
{
...
}
}
internal class TagTimer : Timer
{
public object Tag { get; set; }
}
}
Whenever I double-click my "AsxActivityAliveEventMessageHandler.cs" from the solution explorer, Visual studio pops up a window I've never seen before that gives me the following message:
To prevent possible data loss before loading the designer, the following errors must be resolved:
This is followed by this explanation:
The class TagTimer can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file. Move the class code so that it is the first class in the file and try loading the designer again.
Tried changing the class TagTimer from internal to public to private, but error does not seem do budge. Am I missing something here?