string test = "Тестовый текст 111 222 333 444";
string result = test.Substring(0, test.IndexOf("222 333"));
Console.WriteLine(result);
int number = 0;
Random rn = new Random();
number += rn.Next(1, 100);
textBox1.Text = number.ToString();
label1.Text = number.ToString();
public partial class Temperatures
{
[JsonProperty("Catygocy 01")]
public string[] Catygocy01 { get; set; }
[JsonProperty("Catygocy 02")]
public string[] Catygocy02 { get; set; }
[JsonProperty("Catygocy 03")]
public string[] Catygocy03 { get; set; }
}
short money = 0;
using (BinaryReader br = new BinaryReader(File.OpenRead("Player.chr")))
{
br.BaseStream.Position = 0x6F0; //если позиция не меняется, то очень легко
money = br.ReadInt16();
}
using (BinaryWriter bw = new BinaryWriter(File.OpenWrite("Player.chr")))
{
bw.Seek(0x6F0, SeekOrigin.Begin); //прыгаем в позицию денег
bw.Write(money + 150); //добавим 150 монет, например
}
public string Lg {get; set;}
Login login = new Login();
login.ShowDialog();
string log = login.Lg;
public class Section
{
public string type { get; set; }
public string group { get; set; }
public int count { get; set; }
public string name { get; set; }
public string displaytype { get; set; }
public List<object> data { get; set; }
}
public class RootObject
{
public string xmlns { get; set; }
public string status { get; set; }
public string version { get; set; }
public int webplayer { get; set; }
public string responsetype { get; set; }
public List<Section> sections { get; set; }
}