using System;
public struct Worker
{
public string Name { get; set; }
public Worker(string name) : this() {
Name = name;
}
}
public class Program
{
public static void Print(object o) {
if (o is Worker p) {
Console.WriteLine(p.Name);
}
}
public static void Main()
{
Object o = new Worker("Tom");
Print(o);
}
}
/*
run:
Tom
*/