According to this a string (or String) is a reference type.
Yet given:
Type t = typeof(string);
then
if (t.IsBy
You should use IsValueType instead:
bool f = !typeof (string).IsValueType; //return true;
As for IsByRef, the purpose of this property is to determine whether the parameter is passed into method by ref or by value.
Example you have a method which a is passed by ref:
public static void Foo(ref int a)
{
}
You can determine whether a is pass by reference or not:
bool f = typeof (Program).GetMethod("Foo")
.GetParameters()
.First()
.ParameterType
.IsByRef; //return true