Type typesample = packet.GetType();
Then I want to new an object in the type of typesample
You can instantiate the type by using the Activator class:
var item = Activator.CreateInstance(typesample);