Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Lipnin <v-maxlip@microsoft.com>2019-04-11 15:06:08 +0300
committerMarek Safar <marek.safar@gmail.com>2019-04-12 09:07:07 +0300
commit3657c0239a767a0b5776f30061ea1519144b011a (patch)
treec56da002a001b4ddc59fe6c12f703cfb054d2a59 /mcs/class/referencesource
parent0d6f7a9e6f5dd5ce99a5e55cb4a529e4767f7436 (diff)
Remove #if-def for TypedReference.MakeTypedReference readonly restriction
Diffstat (limited to 'mcs/class/referencesource')
-rw-r--r--mcs/class/referencesource/mscorlib/system/typedreference.cs5
1 files changed, 0 insertions, 5 deletions
diff --git a/mcs/class/referencesource/mscorlib/system/typedreference.cs b/mcs/class/referencesource/mscorlib/system/typedreference.cs
index 3b71114749e..00e8b675981 100644
--- a/mcs/class/referencesource/mscorlib/system/typedreference.cs
+++ b/mcs/class/referencesource/mscorlib/system/typedreference.cs
@@ -56,13 +56,8 @@ namespace System {
if (field == null)
throw new ArgumentException(Environment.GetResourceString("Argument_MustBeRuntimeFieldInfo"));
-#if NETCORE
if (field.IsStatic)
throw new ArgumentException(Environment.GetResourceString("Argument_TypedReferenceInvalidField"));
-#else
- if (field.IsInitOnly || field.IsStatic)
- throw new ArgumentException(Environment.GetResourceString("Argument_TypedReferenceInvalidField"));
-#endif
if (targetType != field.GetDeclaringTypeInternal() && !targetType.IsSubclassOf(field.GetDeclaringTypeInternal()))
throw new MissingMemberException(Environment.GetResourceString("MissingMemberTypeRef"));