本文介绍了Winform和一个附加的类问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Form.cs中创建了代码,并添加了一个类(整个过程充当MVC模型,文件执行文件的逻辑,另一个文件通过WinForm的更改进行说明.问题是,与控制台应用程序时,出现错误,我不明白为什么要获得错误

我得到这个错误:

I created code in the Form.cs and I added a class, (the whole thing acts as an MVC model, file executes the logic of the file, the other file illustrates it with WinForm changes. Problem is, as oppose to a console applications, I get mistakes that I don''t understand why I get them

I get this mistake:




我在Form类中使用了一种方法:




I used one method in my Form class:

public void PrintPieces(Pieces [,] pieces)
{
}



在class2中我这样称呼
C#语法(切换纯文本)



and in the class2 I call it like this
C# Syntax (Toggle Plain Text)

public static void ExecuteAll(int rowStart,int columnStart,int rowEnd,int columnEnd) {
  Pieces[,] pieces = ChessBoard();
  ChessBoard chessB = new ChessBoard();
  chessB.PrintPieces(ChessBoard());
}



为什么会出错?


哦,该死.我现在改变了.现在错误消失了.
这是否意味着我可以毫无问题地使用两个代码的元素.我希望Form.cs在WinForm上显示数据,并添加为执行代码而添加的类.



Why is it a mistake?


Oooh, damn. I changed it now. Now the mistake is gone.
Does it mean that I can use the elements of both codes with no problem. I want the Form.cs to present the data on WinForm and the class that I have added to perform the code

推荐答案



这篇关于Winform和一个附加的类问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 07:12