I have the following static class with a static field:
public static class IncludeExtender {
private static readonly MethodInfo _include = typeof(EntityFrameworkQueryableExtensions).GetTypeInfo();
}
Is there any difference between the previous example and the following one where the field value is defined in the class constructor?
public static class IncludeExtender {
private static readonly MethodInfo _include;
static IncludeExtender() {
_include = typeof(EntityFrameworkQueryableExtensions).GetTypeInfo();
}
}
What would be the best option for this?