Skip to main content

๐Ÿ‘ฉโ€๐Ÿ’ป ๅญ—ไธฒๆ“ทๅ–

ๆ“ทๅ–ๆŒ‡ๅฎš็š„ๅญ—ไธฒ้•ทๅบฆ

ๅ–ๅพ—ๅญ—ไธฒ็š„ๆœซไบ”็ขผโ€‹

string originalString = "้€™ๆ˜ฏไธ€ๅ€‹ๅพˆ้•ท็š„ๅญ—ไธฒ";
int length = originalString.Length;

if (length >= 5)
{
string lastThreeCharacters = originalString.Substring(length - 5);
Console.WriteLine("ๆœซไบ”็ขผ: " + lastThreeCharacters);
}
else
{
// ่™•็†ๅญ—็ฌฆไธฒ้•ทๅบฆไธ่ถณไบ”ๅ€‹char็š„ๆƒ…ๆณ
Console.WriteLine("ๅญ—ไธฒ้•ทๅบฆไธ่ถณไธ‰ๅ€‹char");
}