.NET, Architecture, ALM, Cloud

Publicité

C# 6.0 : Using static

La fonctionnalité C# 6.0 Using Static permet d'accéder directement aux méthodes statiques d'une classe en déclarant au préalable la classe via la directive "using static".


Exemple :


using System;

using static System.Console;

class Program
{
    static void Main(string[] args)
    {
        ReadLine();
    }
}

 

Publicité
Retour à l'accueil
Partager cet article
Repost0
Pour être informé des derniers articles, inscrivez vous :
Commenter cet article