⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 startsends.cs

📁 vc的原码例子12 vc的原码例子12
💻 CS
字号:
using System;

class clsStartsEnds
{
	static void Main()
	{
		string Office1 = "Houston, Texas 77479";
		string Office2 = "Las Vegas, Nevada 85023";

		if (Office1.StartsWith("Houston"))
			Console.WriteLine("{0} starts with Houston", Office1);
		else
			Console.WriteLine("{0} does not start with Houston", Office1);

		if (Office2.StartsWith("Houston"))
			Console.WriteLine("{0} starts with Houston", Office2);
		else
			Console.WriteLine("{0} does not start with Houston", Office2);

		if (Office1.EndsWith("85023"))
			Console.WriteLine("{0} ends with 85023", Office1);
		else
			Console.WriteLine("{0} does not end with 85023", Office1);

		if (Office2.EndsWith("85023"))
			Console.WriteLine("{0} ends with 85023", Office2);
		else
			Console.WriteLine("{0} does not end with 85023", Office2);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -