当前位置:网站首页>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.
边栏推荐
- (部分不懂,笔记整理未完成)【图论】差分约束
- MySQL 5.7 installation tutorial (full-step, nanny-level tutorial)
- HCIP day 3 experiment
- 解决:- SPY: No data found for this date range, symbol may be delisted报错
- 暑期总结(三)
- Nodejs installation and global configuration (super detailed)
- [Dataset][VOC] Male and female dataset voc format 6188 sheets
- 振兴农村循环经济 和数链串起农业“生态链”
- BGP+MPLS Comprehensive Experiment
- Ant three sides: MQ message loss, duplication, backlog problem, what are the solutions?
猜你喜欢

The installation of NPM, CNPM

享年94岁,图灵奖得主、计算复杂性理论先驱Juris Hartmanis逝世

HCIP 第一天

A detailed introduction to the deployment and usage of the Nacos registry

MySQL Advanced Statements (1)

MySQL (3)

MySQL(3)

有点奇怪!访问目的网址,主机能容器却不行

Leading the demand and justifying the HR value - the successful launch of the "Human Resource Leading Model HRLM"

Kingdee International: Lost in half a year and last year, how does the business model of frantically burning money continue
随机推荐
zabbix email alarm and WeChat alarm
mysql索引失效的常见9种原因详解
【npm install 报错问题合集】- npm ERR! code ENOTEMPTY npm ERR! syscall rmdir
数据库概论-MySQL的数据表的基本操作
暑期总结(三)
有点奇怪!访问目的网址,主机能容器却不行
About the local server problem after ue4.27 pixel streaming package
MySQL 23道经典面试吊打面试官
MySQL高级语句(一)
解决C#非静态字段、方法或属性“islandnum.Program.getIslandCount(int[][], int, int)”要求对象引用
MySQL Advanced SQL Statements
ue先视频教程后深入
GCC编译器技术解析
APP专项测试:流量测试
MySQL高级语句(一)
Leetcode周赛304
打卡day05
宝塔+FastAdmin 404 Not Found
MySQL高阶---存储引擎、索引、锁
The nacos source code can not find the istio package