当前位置:网站首页>Resolving C# non-static field, method or property "islandnum.Program.getIslandCount(int[][], int, int)" requires an object reference
Resolving C# non-static field, method or property "islandnum.Program.getIslandCount(int[][], int, int)" requires an object reference
2022-08-02 07:23:00 【xqlily】
Run a piece of code for a two-dimensional array in c#:
When the following code is called in the main function main
getIslandCount(map, row, col);
Error in error title:
A non-static field, method or property 'islandnum.Program.getIslandCount(int[][], int, int)' requires an object reference
Before the main function, this function is defined as follows:
public int getIslandCount(int[][] map, int row, int col)
Then just change the above line of code to:
public static int getIslandCount(int[][] map, int row, int col)
The error is solved, just add a static.
边栏推荐
- 振兴农村循环经济 和数链串起农业“生态链”
- (部分不懂,笔记整理未完成)【图论】差分约束
- Understand C operators in one article
- MySQL classic 50 practice questions and the most detailed analysis of the whole network
- 【21天学习挑战赛】顺序查找
- request.getSession(),的故事
- .NET静态代码织入——肉夹馍(Rougamo) 发布1.1.0
- 项目开发规范
- MySQL 5.7 installation tutorial (full-step, nanny-level tutorial)
- MySQL(3)
猜你喜欢
MySQL - Multi-table query and case detailed explanation
MySQL driver jar package download -- nanny tutorial
MySQL Index Common Interview Questions (2022 Edition)
APP专项测试:流量测试
The nacos source code can not find the istio package
MySQL高级SQL语句(二)
MarkDown Formula Instruction Manual
zabbix auto-discovery and auto-registration
Ant three sides: MQ message loss, duplication, backlog problem, what are the solutions?
MySQL classic 50 practice questions and the most detailed analysis of the whole network
随机推荐
MySQL database video tutorial from beginner to proficient
.NET静态代码织入——肉夹馍(Rougamo) 发布1.1.0
MySQL 23 classic interviews hang the interviewer
PMP新考纲通关秘籍,告别抓瞎
Project development specification
The stock price has repeatedly hit new lows, and the real estate SaaS giant is in trouble. How should Mingyuan Cloud transform and save itself?
View source and switch mirrors in two ways: npm and nrm
MySQL Advanced SQL Statements
Reverse resolve dns server
MySQL高级SQL语句(二)
ASP.NET Core Web API 幂等性
Xgboost报错ValueError:无效的形状:标签(1650 2)
2022年7月18日-7月31日(Ue4视频教程和文档,20小时。合计1412小时,剩8588小时)
提交代码流程
能与观众实时互动的Claper
Technology empowers Lhasa's "lungs", Huawei helps Lalu Wetland Smart Management to protect lucid waters and lush mountains
MySQL 5.7 安装教程(全步骤、保姆级教程)
MySQL高级-MVCC(超详细整理)
Nacos database configuration
In-depth analysis of the initialization of member variables and local variables