标题:菜鸟 才学c# 有问题求帮忙
取消只看楼主
六扇门佰龍
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2013-8-1
结帖率:0
已结贴  问题点数:20 回复次数:0 
菜鸟 才学c# 有问题求帮忙
class Program
    {
        static void Main(string[] args)
        {
            string[] name = {" 蒙奇"," 卡卡"," 整啊大事"," 火影" };
            string s;
   
            for (int i = 0; i < name.Length; i++)
            {
                Console.Write(name[i]);
                s=Fanhui(name.Length);
                Console.WriteLine("s");


            }
            Console.ReadKey();
        }




        public static string Fanhui (int s)
        {
            int i = 1;
            while(i<s)
            //for (int i = 1; i < s; i++)
            {
                i++;
                return "|";
            }
            
        }



    }


总是提示错误: 并非所有的代码路径都返回值      
求帮帮忙啊
搜索更多相关主题的帖子: public 卡卡 火影 
2013-08-01 22:51



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-418443-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019641 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved