You are probably looking for a generic function - this allows your function to specify a type parameter:
public void DoWork<TClass>(int time)
where TClass : quartz.ijob
{
IJobDetail job = JobBuilder.Create<TClass>()
.WithIdentity("job1", "group1")
.Build();
}
Edit
You can also set a restriction on the type parameter that seems to be required here. Use the syntax where TClass : quartz.ijob.
Edit # 2
, . , :
DoWork<SomeClassType>(123);
, , . , :
public void DoWork<TClass>(int time, TClass instance)
where TClass : quartz.ijob
:
var myInstance = new SomeClassType();
DoWork(123, myInstance);
, myInstance , . , , , :
function SomethingOrOther(object instance)
{
DoWork(123, instance);
}
DoWork , (. MakeGenericMethod). , . (.. ) .