Skip to content

Commit 257e932

Browse files
authored
Fix inclusion of DefaultMemberAttribute in no reflection version (#239)
***NO_CI***
1 parent c75a7f0 commit 257e932

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed
Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using System.Runtime.CompilerServices;
55

6-
#if NANOCLR_REFLECTION
7-
86
namespace System.Reflection
97
{
108
using System;
@@ -18,17 +16,15 @@ namespace System.Reflection
1816
[Serializable]
1917
public sealed class DefaultMemberAttribute : Attribute
2018
{
21-
private readonly String _memberName;
22-
2319
// You must provide the name of the member, this is required
2420
/// <summary>
2521
/// Initializes a new instance of the DefaultMemberAttribute class.
2622
/// </summary>
2723
/// <param name="memberName">A String containing the name of the member to invoke. This may be a constructor, method, property, or field.
2824
/// A suitable invocation attribute must be specified when the member is invoked. The default member of a class can be specified by passing an empty String as the name of the member.</param>
29-
public DefaultMemberAttribute(String memberName)
25+
public DefaultMemberAttribute(string memberName)
3026
{
31-
_memberName = memberName;
27+
MemberName = memberName;
3228
}
3329

3430
/// <summary>
@@ -37,11 +33,6 @@ public DefaultMemberAttribute(String memberName)
3733
/// <value>
3834
/// A string representing the member name.
3935
/// </value>
40-
public String MemberName
41-
{
42-
get { return _memberName; }
43-
}
36+
public string MemberName { get; }
4437
}
4538
}
46-
47-
#endif // NANOCLR_REFLECTION

0 commit comments

Comments
 (0)