Skip to content

About sample code variable style problem #23868

Closed
@jonny-xhl

Description

@jonny-xhl

Is the style of the variable in the following code block in the documentation OK?

public static void Main()
{
    Console.WriteLine ("\nReflection.MemberInfo");
    // Gets the Type and MemberInfo.
    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)
    {
        Console.WriteLine("{0} is public.", MyType.FullName);
    }
}

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions