MajorRevision Propiedad
Este artículo proviene de un motor de traducción automática. Mueva el puntero sobre las frases del artículo para ver el texto original. Más información.
Traducción
Original

Version.MajorRevision (Propiedad)

 

Obtiene los 16 bits superiores del número de revisión.

Espacio de nombres:   System
Ensamblado:  mscorlib (en mscorlib.dll)

public short MajorRevision { get; }

Valor de propiedad

Type: System.Int16

Entero de 16 bits con signo.

Suppose you release an interim version of your application to temporarily correct a problem until you can release a permanent solution.The temporary version does not warrant a new revision number, but it does need to be identified as a different version.In this case, encode the identification information in the high and low 16-bit portions of the 32-bit revision number.Use the Revision property to obtain the entire revision number, use the MajorRevision property to obtain the high 16 bits, and use the MinorRevision property to obtain the low 16 bits.

Starting in the .NET Framework version 2.0, the Windows NT operating system uses the MajorRevision property to encode the service pack number.

The following code example demonstrates the Version constructor, and the Major, Minor, Build, Revision, MajorRevision, and MinorRevision properties.

// This example demonstrates the Version.Revision,
// MajorRevision, and MinorRevision properties.
using System;

class Sample 
{
    public static void Main() 
    {

    string fmtStd = "Standard version:\n" +
                    "  major.minor.build.revision = {0}.{1}.{2}.{3}";
    string fmtInt = "Interim version:\n" +
                    "  major.minor.build.majRev/minRev = {0}.{1}.{2}.{3}/{4}";

    Version std = new Version(2, 4, 1128, 2);
    Version interim = new Version(2, 4, 1128, (100 << 16) + 2);

    Console.WriteLine(fmtStd, std.Major, std.Minor, std.Build, std.Revision);
    Console.WriteLine(fmtInt, interim.Major, interim.Minor, interim.Build, 
                              interim.MajorRevision, interim.MinorRevision);
    }
}
/*
This code example produces the following results:

Standard version:
  major.minor.build.revision = 2.4.1128.2
Interim version:
  major.minor.build.majRev/minRev = 2.4.1128.100/2

*/

Universal Windows Platform
Disponible desde 4.5
.NET Framework
Disponible desde 2.0
Portable Class Library
Compatible con: portable .NET platforms
Windows Phone Silverlight
Disponible desde 8.0
Windows Phone
Disponible desde 8.1
Volver al principio
Mostrar:
© 2016 Microsoft