help
Root Question Message
framei
int.framei
after itframei++;
var dict = new Dictionary<int, Action>
{
{ 1, () => Console.WriteLine("Case 1") }
{ 2, () => Console.WriteLine("Case 2") }
{ 3, () => Console.WriteLine("Case 3") }
}
List<string> frames = new()
{
"",
...
}
Console.WriteLine(frames[frame]);
private static int _frame;
private static readonly List<string> _frames = new List<string>()
{
// ...
};
private void Timer_Tick(object sender, EventArgs e)
{
Console.WriteLine(_frames[_frame++]);
}
typeof(YourClass)
.GetMethod($"f{_frame++}", BindingFlags.Static | BindingFlags.NonPublic)
.Invoke(null, null);