// ===++===
//
// OrtizOL
//
// ===--===
/*============================================================
//
// Clase: DatosEstaticos.cs
//
// Propósito: Uso de datos estáticos con tipos genéricos.
//
============================================================*/
using System;
namespace Articulos.Cap03
{
internal class Coleccion<T>
{
public static int Contador;
}
internal class DatosEstaticos
{
public static void Main()
{
Console.WriteLine(++Coleccion<int>.Contador);
Console.WriteLine(++Coleccion<int>.Contador);
Console.WriteLine(++Coleccion<object>.Contador);
Console.WriteLine(++Coleccion<string>.Contador);
}
}
}
Ly8gPT09Kys9PT0KLy8KLy8gICAgT3J0aXpPTAovLwovLyA9PT0tLT09PQovKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQovLwovLyBDbGFzZTogRGF0b3NFc3RhdGljb3MuY3MKLy8KLy8gUHJvcMOzc2l0bzogVXNvIGRlIGRhdG9zIGVzdMOhdGljb3MgY29uIHRpcG9zIGdlbsOpcmljb3MuCi8vCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCgp1c2luZyBTeXN0ZW07CgpuYW1lc3BhY2UgQXJ0aWN1bG9zLkNhcDAzCnsKICAgIGludGVybmFsIGNsYXNzIENvbGVjY2lvbjxUPgogICAgewogICAgICAgIHB1YmxpYyBzdGF0aWMgaW50IENvbnRhZG9yOwogICAgfQogICAgaW50ZXJuYWwgY2xhc3MgRGF0b3NFc3RhdGljb3MKICAgIHsKICAgICAgICBwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCiAgICAgICAgewogICAgICAgICAgICBDb25zb2xlLldyaXRlTGluZSgrK0NvbGVjY2lvbjxpbnQ+LkNvbnRhZG9yKTsKICAgICAgICAgICAgQ29uc29sZS5Xcml0ZUxpbmUoKytDb2xlY2Npb248aW50Pi5Db250YWRvcik7CiAgICAgICAgICAgIENvbnNvbGUuV3JpdGVMaW5lKCsrQ29sZWNjaW9uPG9iamVjdD4uQ29udGFkb3IpOwogICAgICAgICAgICBDb25zb2xlLldyaXRlTGluZSgrK0NvbGVjY2lvbjxzdHJpbmc+LkNvbnRhZG9yKTsKICAgICAgICB9CiAgICB9Cn0=