Browse Source

* MonoProperty.cs: return correct MethodInfo for
property with only a get or set method. Fixes
bug #58661.

svn path=/trunk/mcs/; revision=27601

Gert Driesen 21 years ago
parent
commit
05ed4022f3

+ 6 - 0
mcs/class/corlib/System.Reflection/ChangeLog

@@ -1,3 +1,9 @@
+2004-05-18  Gert Driesen ([email protected])
+
+	* MonoProperty.cs: return correct MethodInfo for 
+	property with only a get or set method. Fixes
+	bug #58661.
+
 2004-05-18  Sebastien Pouliot  <[email protected]>
 
 	* Assembly.cs: Return an empty Evidence collection to avoid 

+ 2 - 2
mcs/class/corlib/System.Reflection/MonoProperty.cs

@@ -113,9 +113,9 @@ namespace System.Reflection {
 			
 			MonoPropertyInfo.get_property_info (this, out info, PInfo.GetMethod | PInfo.SetMethod);
 			if (info.set_method != null && (nonPublic || info.set_method.IsPublic))
-				nget = 1;
-			if (info.get_method != null && (nonPublic || info.get_method.IsPublic))
 				nset = 1;
+			if (info.get_method != null && (nonPublic || info.get_method.IsPublic))
+				nget = 1;
 
 			MethodInfo[] res = new MethodInfo [nget + nset];
 			int n = 0;