diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.types.viewinfo/cpp/source2.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.types.viewinfo/cpp/source2.cpp index f3058a85c5254..a8d5ca8bf3a5d 100644 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.types.viewinfo/cpp/source2.cpp +++ b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.types.viewinfo/cpp/source2.cpp @@ -3,28 +3,28 @@ using namespace System; using namespace System::IO; using namespace System::Reflection; -public ref class Mymemberinfo +public ref class MyMemberInfo { public: static void Main() { Console::WriteLine ("\nReflection.MemberInfo"); // Gets the Type and MemberInfo. - Type^ MyType = Type::GetType("System.IO.File"); - array^ Mymemberinfoarray = MyType->GetMembers(); + Type^ myType = Type::GetType("System.IO.File"); + array^ myMemberInfoArray = myType->GetMembers(); // Gets and displays the DeclaringType method. Console::WriteLine("\nThere are {0} members in {1}.", - Mymemberinfoarray->Length, MyType->FullName); - Console::WriteLine("{0}.", MyType->FullName); - if (MyType->IsPublic) + myMemberInfoArray->Length, myType->FullName); + Console::WriteLine("{0}.", myType->FullName); + if (myType->IsPublic) { - Console::WriteLine("{0} is public.", MyType->FullName); + Console::WriteLine("{0} is public.", myType->FullName); } } }; int main() { - Mymemberinfo::Main(); + MyMemberInfo::Main(); } // diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.types.viewinfo/cpp/source3.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.types.viewinfo/cpp/source3.cpp index 9ec3ef9170dc3..d1fbf3af7362d 100644 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.types.viewinfo/cpp/source3.cpp +++ b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.types.viewinfo/cpp/source3.cpp @@ -10,37 +10,37 @@ public ref class MyMethodInfo { Console::WriteLine("Reflection.MethodInfo"); // Gets and displays the Type. - Type^ MyType = Type::GetType("System.Reflection.FieldInfo"); + Type^ myType = Type::GetType("System.Reflection.FieldInfo"); // Specifies the member for which you want type information. - MethodInfo^ Mymethodinfo = MyType->GetMethod("GetValue"); - Console::WriteLine(MyType->FullName + "." + Mymethodinfo->Name); + MethodInfo^ myMethodInfo = myType->GetMethod("GetValue"); + Console::WriteLine(myType->FullName + "." + myMethodInfo->Name); // Gets and displays the MemberType property. - MemberTypes Mymembertypes = Mymethodinfo->MemberType; - if (MemberTypes::Constructor == Mymembertypes) + MemberTypes myMemberTypes = myMethodInfo->MemberType; + if (MemberTypes::Constructor == myMemberTypes) { Console::WriteLine("MemberType is of type All"); } - else if (MemberTypes::Custom == Mymembertypes) + else if (MemberTypes::Custom == myMemberTypes) { Console::WriteLine("MemberType is of type Custom"); } - else if (MemberTypes::Event == Mymembertypes) + else if (MemberTypes::Event == myMemberTypes) { Console::WriteLine("MemberType is of type Event"); } - else if (MemberTypes::Field == Mymembertypes) + else if (MemberTypes::Field == myMemberTypes) { Console::WriteLine("MemberType is of type Field"); } - else if (MemberTypes::Method == Mymembertypes) + else if (MemberTypes::Method == myMemberTypes) { Console::WriteLine("MemberType is of type Method"); } - else if (MemberTypes::Property == Mymembertypes) + else if (MemberTypes::Property == myMemberTypes) { Console::WriteLine("MemberType is of type Property"); } - else if (MemberTypes::TypeInfo == Mymembertypes) + else if (MemberTypes::TypeInfo == myMemberTypes) { Console::WriteLine("MemberType is of type TypeInfo"); } diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.types.viewinfo/cs/source2.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.types.viewinfo/cs/source2.cs index b704287347483..518a64deb6e57 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.types.viewinfo/cs/source2.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.types.viewinfo/cs/source2.cs @@ -3,21 +3,21 @@ using System.IO; using System.Reflection; -class Mymemberinfo +class MyMemberInfo { public static void Main() { Console.WriteLine ("\nReflection.MemberInfo"); // Gets the Type and MemberInfo. - Type MyType = Type.GetType("System.IO.File"); - MemberInfo[] Mymemberinfoarray = MyType.GetMembers(); + Type myType = Type.GetType("System.IO.File"); + MemberInfo[] myMemberInfoArray = myType.GetMembers(); // Gets and displays the DeclaringType method. Console.WriteLine("\nThere are {0} members in {1}.", - Mymemberinfoarray.Length, MyType.FullName); - Console.WriteLine("{0}.", MyType.FullName); - if (MyType.IsPublic) + myMemberInfoArray.Length, myType.FullName); + Console.WriteLine("{0}.", myType.FullName); + if (myType.IsPublic) { - Console.WriteLine("{0} is public.", MyType.FullName); + Console.WriteLine("{0} is public.", myType.FullName); } } } diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.types.viewinfo/cs/source3.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.types.viewinfo/cs/source3.cs index 0c439a02c6a59..3345937c28876 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.types.viewinfo/cs/source3.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.types.viewinfo/cs/source3.cs @@ -9,37 +9,37 @@ public static int Main() { Console.WriteLine("Reflection.MethodInfo"); // Gets and displays the Type. - Type MyType = Type.GetType("System.Reflection.FieldInfo"); + Type myType = Type.GetType("System.Reflection.FieldInfo"); // Specifies the member for which you want type information. - MethodInfo Mymethodinfo = MyType.GetMethod("GetValue"); - Console.WriteLine(MyType.FullName + "." + Mymethodinfo.Name); + MethodInfo myMethodInfo = myType.GetMethod("GetValue"); + Console.WriteLine(myType.FullName + "." + myMethodInfo.Name); // Gets and displays the MemberType property. - MemberTypes Mymembertypes = Mymethodinfo.MemberType; - if (MemberTypes.Constructor == Mymembertypes) + MemberTypes myMemberTypes = myMethodInfo.MemberType; + if (MemberTypes.Constructor == myMemberTypes) { Console.WriteLine("MemberType is of type All"); } - else if (MemberTypes.Custom == Mymembertypes) + else if (MemberTypes.Custom == myMemberTypes) { Console.WriteLine("MemberType is of type Custom"); } - else if (MemberTypes.Event == Mymembertypes) + else if (MemberTypes.Event == myMemberTypes) { Console.WriteLine("MemberType is of type Event"); } - else if (MemberTypes.Field == Mymembertypes) + else if (MemberTypes.Field == myMemberTypes) { Console.WriteLine("MemberType is of type Field"); } - else if (MemberTypes.Method == Mymembertypes) + else if (MemberTypes.Method == myMemberTypes) { Console.WriteLine("MemberType is of type Method"); } - else if (MemberTypes.Property == Mymembertypes) + else if (MemberTypes.Property == myMemberTypes) { Console.WriteLine("MemberType is of type Property"); } - else if (MemberTypes.TypeInfo == Mymembertypes) + else if (MemberTypes.TypeInfo == myMemberTypes) { Console.WriteLine("MemberType is of type TypeInfo"); } diff --git a/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.types.viewinfo/vb/source2.vb b/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.types.viewinfo/vb/source2.vb index be54d7cd9715b..ff4d8f7f00b63 100644 --- a/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.types.viewinfo/vb/source2.vb +++ b/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.types.viewinfo/vb/source2.vb @@ -2,18 +2,18 @@ Imports System.IO Imports System.Reflection -Class Mymemberinfo +Class MyMemberInfo Public Shared Sub Main() Console.WriteLine("\nReflection.MemberInfo") ' Gets the Type and MemberInfo. - Dim MyType As Type = Type.GetType("System.IO.File") - Dim Mymemberinfoarray() As MemberInfo = MyType.GetMembers() + Dim myType As Type = Type.GetType("System.IO.File") + Dim myMemberInfoArray() As MemberInfo = myType.GetMembers() ' Gets and displays the DeclaringType method. Console.WriteLine("\nThere are {0} members in {1}.", - Mymemberinfoarray.Length, MyType.FullName) - Console.WriteLine("{0}.", MyType.FullName) - If MyType.IsPublic - Console.WriteLine("{0} is public.", MyType.FullName) + myMemberInfoArray.Length, myType.FullName) + Console.WriteLine("{0}.", myType.FullName) + If myType.IsPublic + Console.WriteLine("{0} is public.", myType.FullName) End If End Sub End Class diff --git a/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.types.viewinfo/vb/source3.vb b/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.types.viewinfo/vb/source3.vb index 07ab92933c7cc..bb657a1bfec6d 100644 --- a/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.types.viewinfo/vb/source3.vb +++ b/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.types.viewinfo/vb/source3.vb @@ -5,25 +5,25 @@ Class MyMethodInfo Public Shared Sub Main() Console.WriteLine("Reflection.MethodInfo") ' Gets and displays the Type. - Dim MyType As Type = Type.GetType("System.Reflection.FieldInfo") + Dim myType As Type = Type.GetType("System.Reflection.FieldInfo") ' Specifies the member for which you want type information. - Dim Mymethodinfo As MethodInfo = MyType.GetMethod("GetValue") - Console.WriteLine((MyType.FullName & "." & Mymethodinfo.Name)) + Dim myMethodInfo As MethodInfo = myType.GetMethod("GetValue") + Console.WriteLine((myType.FullName & "." & myMethodInfo.Name)) ' Gets and displays the MemberType property. - Dim Mymembertypes As MemberTypes = Mymethodinfo.MemberType - If MemberTypes.Constructor = Mymembertypes Then + Dim myMemberTypes As MemberTypes = myMethodInfo.MemberType + If MemberTypes.Constructor = myMemberTypes Then Console.WriteLine("MemberType is of type All") - ElseIf MemberTypes.Custom = Mymembertypes Then + ElseIf MemberTypes.Custom = myMemberTypes Then Console.WriteLine("MemberType is of type Custom") - ElseIf MemberTypes.Event = Mymembertypes Then + ElseIf MemberTypes.Event = myMemberTypes Then Console.WriteLine("MemberType is of type Event") - ElseIf MemberTypes.Field = Mymembertypes Then + ElseIf MemberTypes.Field = myMemberTypes Then Console.WriteLine("MemberType is of type Field") - ElseIf MemberTypes.Method = Mymembertypes Then + ElseIf MemberTypes.Method = myMemberTypes Then Console.WriteLine("MemberType is of type Method") - ElseIf MemberTypes.Property = Mymembertypes Then + ElseIf MemberTypes.Property = myMemberTypes Then Console.WriteLine("MemberType is of type Property") - ElseIf MemberTypes.TypeInfo = Mymembertypes Then + ElseIf MemberTypes.TypeInfo = myMemberTypes Then Console.WriteLine("MemberType is of type TypeInfo") End If Return