long int filesize = GetFileSize(string(filename)) - sizeof(s.name) - sizeof(s.car) - sizeof(int);
Stream stream = System.IO.File.OpenRead("photo.png");
BotClient.SendPhotoAsync("chat id", stream);
string fileId = "file_id on Telegram servers";
BotClient.SendPhotoAsync("chat id", fileId);
botclient.SendPhotoAsync(e.Message.Chat.Id, new Telegram.Bot.Types.InputFiles.InputOnlineFile(stream, "photo123.jpg"), "123");
class Settings
{
public bool StartMessage { get; set; } = false;
public List<User> users = new List<User>();
public List<string> keys = new List<string>();
public static void Save(Settings[] settings) => File.WriteAllText("settings.json", JsonConvert.SerializeObject(settings));
}
{
users = {
"@cyber_andrey" = {
"password" : "123123"
}
}
}
#pragma pack(push, 1) // 1 или 4
И всё будет нормально?