using [] syntax

This commit is contained in:
Wizou 2024-03-08 11:33:18 +01:00
parent f958b4081d
commit 345f10971b
3 changed files with 6 additions and 6 deletions

View file

@ -17,8 +17,8 @@ namespace WTelegramClientTest
{
static WTelegram.Client Client;
static User My;
static readonly Dictionary<long, User> Users = new();
static readonly Dictionary<long, ChatBase> Chats = new();
static readonly Dictionary<long, User> Users = [];
static readonly Dictionary<long, ChatBase> Chats = [];
// See steps at the end of this file to setup required Environment variables
static async Task Main(string[] _)

View file

@ -9,8 +9,8 @@ namespace WTelegramClientTest
{
static WTelegram.Client Client;
static User My;
static readonly Dictionary<long, User> Users = new();
static readonly Dictionary<long, ChatBase> Chats = new();
static readonly Dictionary<long, User> Users = [];
static readonly Dictionary<long, ChatBase> Chats = [];
// go to Project Properties > Debug > Environment variables and add at least these: api_id, api_hash, phone_number
static async Task Main(string[] _)

View file

@ -13,8 +13,8 @@ namespace WTelegramClientTest
static Client Client;
static SecretChats Secrets;
static ISecretChat ActiveChat; // the secret chat currently selected
static readonly Dictionary<long, User> Users = new();
static readonly Dictionary<long, ChatBase> Chats = new();
static readonly Dictionary<long, User> Users = [];
static readonly Dictionary<long, ChatBase> Chats = [];
// go to Project Properties > Debug > Environment variables and add at least these: api_id, api_hash, phone_number
static async Task Main()