我试图让 for 语句迭代并i从0 to 100.
这将显示在屏幕上。
我的问题不是很理解我想在方法中返回什么(不是 Main),而是如果我需要返回任何东西。
我不想返回一个int。我认为我没有要返回的字符串,因为我希望它执行一个函数而不是返回一个值。我想我搞砸了方法类型。
我希望该方法简单地通过 if 语句,如果参数匹配,则在屏幕上显示结果,如果不移动到底部并从 for 语句重新开始。
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    namespace Project5
    {
      class Program
      {
        int i = 0;
        static void Main(int i)
        {
            do
            {
                for (i = 0; i < 101; i++)
                {
                    Words(); 
                }
            } while (i < 101);
            Console.ReadLine();
        }
        static string Words (int i) //<---Here I think I am using the incorrect method type
        {//Which then screws up the method when it is called above. I have been going                
        //through method types but dont see anything that when called just perform a         
        //function and displays results.
            string f = "Word1";
            string b = "Word2";
            if (i == 3)
            {
                Console.Write(f);
                if (i == 5)
                {
                    Console.Write(b);
                    if (0 == (i % 3))
                    {
                        Console.Write(f);
                        if (0 == i % 5)
                        {
                            Console.Write(b);
                        }
                        else
                        {
                            Console.WriteLine(i);  
                        }
                    }
                }
            }
        }
    }
}