You are talking about polymorphism, so use it.
If you have 2 types with same or common methods and you have a function or set of functions to act on them, define an interface
that describes that set of methods shared between those 2 types and :
If the types you're talking about are named SPFile
and SPFolder
public class SPFile : IMyNewInterface {
.....
}
public class SPFolder : IMyNewInterface {
...
}
public static void SetFolderOrderValue<T>(T item, int value,
Report reportObject) where T : IMyNewInterface {
...
}