我将创建一个sample.txt文件.然后我将更sample.txt改为 sample.tar
我如何知道示例文件的真实类型?
如何检查字符串中每个单词的长度,如果一个大于10,则显示不同的响应?
半Psuedo
string allwords= "This is a test this is a test aaaaaaaaaaa this is a test";
if (allwords.Length < 10) {
Console.WriteLine (allwords.Length);
}
else
{
Console.WriteLine ("Woahh there one of these words is more than 10 chars");
}
Run Code Online (Sandbox Code Playgroud)