[英]Problem Creating dll library file from various methods in C#?
sereenshot of my project我的项目的截图
Put your LoadColumn function inside of your class将您的 LoadColumn function 放入您的 class
Note that in C#, methods and variables must be declared and defined within a struct or class.请注意,在 C# 中,方法和变量必须在结构或 class 中声明和定义。 For more information on program structure in C#, see the General Structure of a C# Program article.
有关 C# 中程序结构的更多信息,请参阅 C# 程序的一般结构文章。 To fix this error, rewrite your code such that all methods and fields are contained within either a struct or a class.
要修复此错误,请重写您的代码,使所有方法和字段都包含在结构或 class 中。
Reference: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs0116#:~:text=A%20namespace%20cannot%20directly%20contain,see%20the%20namespace%20keyword%20article .参考: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs0116#:~:text=A%20namespace%20cannot%20directly%20contain,see%20the%20namespace %20关键字%20文章。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.