全文预览

天津理工大学C#试验一

上传者:梦&殇 |  格式:doc  |  页数:12 |  大小:341KB

文档介绍
tem.Collections.Generic;Рusing System.Linq;Рusing System.Text;Рnamespace 实º¦Ì验¨¦1._6Р{Р class ProgramР {Р static void Main(string[] args)Р {Р //ContainsР string s = "葫¨´芦?娃ªT,ê?葫¨´芦?娃ªT,ê?一°?根¨´藤¬¨´上¦?七?朵?花¡§";Р bool b = s.Contains("葫¨´芦?娃ªT");Р Console.WriteLine(b);Р bool c = s.Contains("");//空?字Á?符¤?串ä?也°2返¤¦Ì回?TrueР Console.WriteLine(c);Р bool d = s.Contains("哪?吒?");Р Console.WriteLine(d);Р //SplitР string data = "2017-4-16";Р string[] t = data.Split('-');Р foreach(string str in t)Р Console.WriteLine(str);Р //joinР string time = string.Join("/",t);Р Console.WriteLine(time);Р string s1 = "猴?哥?,";Р string s2 = "你?真?了¢?不?得Ì?";Р Console.WriteLine(string.Concat(s1, s1, s2));Р //IndexOfР Console.WriteLine(data.IndexOf("4"));Р //CopyР string s3 = "天¬¨¬苍?苍?,ê?野°¡ã茫¡ê茫¡ê,ê?风¤?吹ä¦Ì草Y低̨ª见?牛¡ê羊¨°"

收藏

分享

举报
下载此文档