PDA

View Full Version : کسی معنی این کدها رو میدونه؟



shabgardetanha
پنج شنبه 18 آبان 1396, 10:26 صبح
public static string CheckMoshavere(string chatid)
{
try
{
string a = Moshavere.Substring(Moshavere.IndexOf(chatid), Moshavere.Length - Moshavere.IndexOf(chatid));
string b = a.Substring(a.IndexOf(":") + 1, a.IndexOf(",") - a.IndexOf(":") - 1);
return b;
}
catch
{
return "";
}
}




public static void DeleteMoshavere(string chatid)
{
try
{
string a = Moshavere.Substring(Moshavere.IndexOf(chatid), Moshavere.Length - Moshavere.IndexOf(chatid));
string b = a.Substring(a.IndexOf(":") + 1, a.IndexOf(",") - a.IndexOf(":") - 1);
Moshavere = Moshavere.Replace(chatid + ":" + b + ",", "");
}
catch
{


}
}
public static void AddMoshavere(string chatid, string text)
{
string a = CheckMoshavere(chatid);
DeleteMoshavere(chatid);
Moshavere += chatid + ":" + a + "\n" + text + ",";
}
public static void DeleteLocation(string chatid)
{
try
{
string a = Location.Substring(Location.IndexOf(chatid), Location.Length - Location.IndexOf(chatid));
string b = a.Substring(a.IndexOf(":") + 1, a.IndexOf(",") - a.IndexOf(":") - 1);
Location = Location.Replace(chatid + ":" + b + ",", "");
}
catch
{


}
}
public static void AddLocation(string chatid, string location)
{
DeleteLocation(chatid);
Location += chatid + ":" + location + ",";
}
public static string CheckLocation(string chatid)
{
try
{
string a = Location.Substring(Location.IndexOf(chatid), Location.Length - Location.IndexOf(chatid));
string b = a.Substring(a.IndexOf(":") + 1, a.IndexOf(",") - a.IndexOf(":") - 1);
return b;
}
catch
{
return "start";
}
}





ممنون میشم بگید اینها معنی شون چیه؟

shabgardetanha
جمعه 19 آبان 1396, 08:40 صبح
کسی نمیتونه توضیح بده؟؟
خواهش...

m.khani_121
یک شنبه 21 آبان 1396, 13:07 عصر
والا کلیت ماجرا رو بخوای اینه که کلاسی هست که دو تا ورودی رشته میگیره روی این دو تا رشته تغییرات میده و پاسخ رو برمیگردونه .

shabgardetanha
دوشنبه 22 آبان 1396, 10:38 صبح
ممنون تشکر