string C# の組込み型 string の実体は System.String クラスです。 System.String クラスには以下のようなメソッドが標準で用意されています。 (以下の例に挙げるもの以外にも、いくつかのメソッドがあります。) using System; class TestString { static void Main() { string s = "This Is a Program Which Allows You to Play It"; // ToUpper … アルファベットを大文字に変換 Console.Write(s.ToUpper() + "\n"); // ToLower … アルファベットを小文字に変換 Console.Write(s.ToLower() + "\n"); // Replace … 文字列の置換 Console.Write(s
![文字列関係](https://cdn-ak-scissors.b.st-hatena.com/image/square/4d1b2b57fc676d21e7f59f354364abeac0ea062e/height=288;version=1;width=512/https%3A%2F%2Fufcpp.net%2Fimages%2Flogo_4.jpg)