小编Joe*_*rts的帖子

c#error:是一个'field',但在尝试使用while循环时用作'type'

我正在通过C#进行euler项目来学习语言并在暑假期间保持我的编码技能(我是大学生).所以我对这门语言很新.我试图寻找这个错误的答案,但我找到的所有其他类似问题都没有处理while循环.有问题的代码是:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EulerProblems
{
    class Problem2
    {
        List<int> fib = new List<int>();
        bool notAtLimit = true;

        while(notAtLimit)
        {
             //code to populate list of fibonacci series
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

c# while-loop

-4
推荐指数
1
解决办法
66
查看次数

标签 统计

c# ×1

while-loop ×1