|
971 | 971 |
|
972 | 972 |
|
973 | 973 | ## Examples
|
974 |
| - The following code example defines fields with varying levels of visibility, and displays the values of their <xref:System.Reflection.FieldInfo.IsAssembly%2A>, <xref:System.Reflection.FieldInfo.IsFamily%2A>, <xref:System.Reflection.FieldInfo.IsFamilyOrAssembly%2A>, and <xref:System.Reflection.FieldInfo.IsFamilyAndAssembly%2A> properties. |
975 |
| - |
976 |
| -> [!NOTE] |
977 |
| -> The Visual Basic and C# languages cannot define fields with <xref:System.Reflection.FieldAttributes.FamANDAssem?displayProperty=nameWithType> visibility; that access level appears only in the C++ example. |
978 |
| - |
| 974 | + The following code example defines fields with varying levels of visibility, and displays the values of their <xref:System.Reflection.FieldInfo.IsAssembly%2A>, <xref:System.Reflection.FieldInfo.IsFamily%2A>, <xref:System.Reflection.FieldInfo.IsFamilyOrAssembly%2A>, and <xref:System.Reflection.FieldInfo.IsFamilyAndAssembly%2A> properties. |
| 975 | +
|
979 | 976 | [!code-cpp[Classic FieldInfo.IsAssembly Example#1](~/samples/snippets/cpp/VS_Snippets_CLR_Classic/classic FieldInfo.IsAssembly Example/CPP/source.cpp#1)]
|
980 | 977 | [!code-csharp[Classic FieldInfo.IsAssembly Example#1](~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic FieldInfo.IsAssembly Example/CS/source.cs#1)]
|
981 | 978 | [!code-vb[Classic FieldInfo.IsAssembly Example#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic FieldInfo.IsAssembly Example/VB/source.vb#1)]
|
|
1042 | 1039 | ## Examples
|
1043 | 1040 | The following code example defines fields with varying levels of visibility, and displays the values of their <xref:System.Reflection.FieldInfo.IsAssembly%2A>, <xref:System.Reflection.FieldInfo.IsFamily%2A>, <xref:System.Reflection.FieldInfo.IsFamilyOrAssembly%2A>, and <xref:System.Reflection.FieldInfo.IsFamilyAndAssembly%2A> properties.
|
1044 | 1041 |
|
1045 |
| -> [!NOTE] |
1046 |
| -> The Visual Basic and C# languages cannot define fields with <xref:System.Reflection.FieldAttributes.FamANDAssem?displayProperty=nameWithType> visibility; that access level appears only in the C++ example. |
1047 |
| - |
| 1042 | +
|
1048 | 1043 | [!code-cpp[Classic FieldInfo.IsAssembly Example#1](~/samples/snippets/cpp/VS_Snippets_CLR_Classic/classic FieldInfo.IsAssembly Example/CPP/source.cpp#1)]
|
1049 | 1044 | [!code-csharp[Classic FieldInfo.IsAssembly Example#1](~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic FieldInfo.IsAssembly Example/CS/source.cs#1)]
|
1050 | 1045 | [!code-vb[Classic FieldInfo.IsAssembly Example#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic FieldInfo.IsAssembly Example/VB/source.vb#1)]
|
|
1107 | 1102 | ## Remarks
|
1108 | 1103 | If a field has <xref:System.Reflection.FieldAttributes.FamANDAssem> level visibility, it can be called from any member in a derived class that is also in the same assembly, but not from any other type.
|
1109 | 1104 |
|
1110 |
| - The visibility of a field is exactly described by <xref:System.Reflection.FieldAttributes.FamANDAssem?displayProperty=nameWithType> if the visibility modifier is `protected private` in C++. Fields with this visibility cannot be defined in Visual Basic or C#. |
| 1105 | + The visibility of a field is exactly described by <xref:System.Reflection.FieldAttributes.FamANDAssem?displayProperty=nameWithType> if the visibility modifier is `private protected` in C#, `Private Protected` in Visual Basic, or `protected private` in C++. |
1111 | 1106 |
|
1112 | 1107 |
|
1113 | 1108 |
|
1114 | 1109 | ## Examples
|
1115 | 1110 | The following code example defines fields with varying levels of visibility, and displays the values of their <xref:System.Reflection.FieldInfo.IsAssembly%2A>, <xref:System.Reflection.FieldInfo.IsFamily%2A>, <xref:System.Reflection.FieldInfo.IsFamilyOrAssembly%2A>, and <xref:System.Reflection.FieldInfo.IsFamilyAndAssembly%2A> properties.
|
1116 | 1111 |
|
1117 |
| -> [!NOTE] |
1118 |
| -> The Visual Basic and C# languages cannot define fields with <xref:System.Reflection.FieldAttributes.FamANDAssem?displayProperty=nameWithType> visibility; that access level appears only in the C++ example. |
1119 |
| - |
| 1112 | +
|
1120 | 1113 | [!code-cpp[Classic FieldInfo.IsAssembly Example#1](~/samples/snippets/cpp/VS_Snippets_CLR_Classic/classic FieldInfo.IsAssembly Example/CPP/source.cpp#1)]
|
1121 | 1114 | [!code-csharp[Classic FieldInfo.IsAssembly Example#1](~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic FieldInfo.IsAssembly Example/CS/source.cs#1)]
|
1122 | 1115 | [!code-vb[Classic FieldInfo.IsAssembly Example#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic FieldInfo.IsAssembly Example/VB/source.vb#1)]
|
|
1187 | 1180 | ## Examples
|
1188 | 1181 | The following code example defines fields with varying levels of visibility, and displays the values of their <xref:System.Reflection.FieldInfo.IsAssembly%2A>, <xref:System.Reflection.FieldInfo.IsFamily%2A>, <xref:System.Reflection.FieldInfo.IsFamilyOrAssembly%2A>, and <xref:System.Reflection.FieldInfo.IsFamilyAndAssembly%2A> properties.
|
1189 | 1182 |
|
1190 |
| -> [!NOTE] |
1191 |
| -> The Visual Basic and C# languages cannot define fields with <xref:System.Reflection.FieldAttributes.FamANDAssem?displayProperty=nameWithType> visibility; that access level appears only in the C++ example. |
1192 |
| - |
| 1183 | +
|
1193 | 1184 | [!code-cpp[Classic FieldInfo.IsAssembly Example#1](~/samples/snippets/cpp/VS_Snippets_CLR_Classic/classic FieldInfo.IsAssembly Example/CPP/source.cpp#1)]
|
1194 | 1185 | [!code-csharp[Classic FieldInfo.IsAssembly Example#1](~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic FieldInfo.IsAssembly Example/CS/source.cs#1)]
|
1195 | 1186 | [!code-vb[Classic FieldInfo.IsAssembly Example#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic FieldInfo.IsAssembly Example/VB/source.vb#1)]
|
|
0 commit comments