(The following answer assumes Unity Javascript. I’m not as familiar with the finer details of C# so I can’t quite speak to that)
Well:
All vars, to my knowledge, are objects.
Use the following:
var variableAsComponent : Component = testVar;
if variableAsComponent is not null, then testVar is an instance of a class derived from Component
3 and 4)
You’ll have to use System.Reflection, and have the name of the variable and the class of which it might be a property or a field. (A reference is insufficient in this case because it lacks context)
import System.Reflection;
var theType : Type = testMonoBehaviour.GetType();
var thePropertyInfo : PropertyInfo = theType.GetProperty("potentialPropertyName");
Again, if thePropertyInfo is non-null, then it’s a property of that class. You can do the same thing with Method, Member, and Field by changing every instance of “Property” in that example.
Your next question is not really relevant. All objects - aside from primitives (and, I think - but am not 100% sure - structs) - are always passed by reference.