- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- // 文字列の置換
- Console.WriteLine("\"リンゴ,バナナ,イチゴ\".Replace(\"バナナ\", \"オレンジ\") → " + "リンゴ,バナナ,イチゴ".Replace("バナナ", "オレンジ")); // 「バナナ」を「オレンジ」に置換して返却
-
- Console.ReadLine();
- }
- }
- }
|