对于一项作业,我不得不将分形渲染程序从 Java 转换为 C#,我想我已经完成了,但是当我尝试运行它时,我得到了标题中存在的错误,我不知道为什么会这样发生。这是渲染器本身的代码,它没有出现任何错误:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Form1
{
public partial class Form1 : Form
{
public Form1()
{
init();
start();
this.DoubleBuffered = true;
}
//code to convert HSB to RGB from HSB.cs. All your code so i made it take up less space.
public struct HSBColor
{
float h;
float s;
float b;
int a;
public HSBColor(float h, float s, float b) { …Run Code Online (Sandbox Code Playgroud)