当前位置:网站首页>字典与int矩阵
字典与int矩阵
2022-07-26 10:41:00 【Lovey_北禾】
字典——Dictionary
字典常用的方法——fo'reach循环
foreach (var item in list)
{
//Key的值:item.Key,value的值:item.Value;
//通过值找键
if (list.ContainsValue("值"))
{
item.Key//找到键
}
//通过键找值
if (list.ContainsKey(键))
{
item.Value//找到值
}
}
int矩阵——int[][]
就是好几个数组组成一个矩阵,先扒开分开各个数组,在进去各个数组里面寻找具体数组的元素。
int[][] mat;
for (int i = 0; i < mat.Length; i++)
{
for (int j = 0; j < mat[i].Length; j++)//第i个数组
{
if (mat[i][j] == 1)//第i个数组里面的第j个元素
{
}
}
}
边栏推荐
- Uniapp uses the simple method signalr (only for web debugging, cannot package apps)
- Redis implementation of distributed lock solution
- Application of.Net open source framework in industrial production
- 第6期:大学生应该选择哪种主流编程语言
- 文案秘籍七步曲至----文献团队协作管理
- The problem of large fluctuation of hx711 data
- Centos8 (liunx) deploying WTM (asp.net 5) using PgSQL
- [leetcode daily question 2021/2/14]765. Lovers hold hands
- .net operation redis set unordered collection
- 剑指Offer(五十三):表示数值的字符串
猜你喜欢

Codepoint 58880 not found in font, aborting. flutter build apk时报错
![[leetcode每日一题2021/2/18]【详解】995. K 连续位的最小翻转次数](/img/de/62fca587cde95110c2a967ca93eea5.png)
[leetcode每日一题2021/2/18]【详解】995. K 连续位的最小翻转次数

Disable usbjatg in Altium Designer
![Error[Pe147]: declaration is incompatible with '错误问题](/img/4f/57145d78f4dc1fe84d2f271dd9d82f.png)
Error[Pe147]: declaration is incompatible with '错误问题

.net5wtm (asp.net core) PgSQL unpacking operation

粽子大战 —— 猜猜谁能赢

Sql Server 数据库之数据类型

Write to esp8266 burning brush firmware

kali 查看ip地址

Centos8 (liunx) deploying WTM (asp.net 5) using PgSQL
随机推荐
[machine learning notes] [style transfer] deeplearning ai course4 4th week programming(tensorflow2)
剑指Offer(八):跳台阶
12 don't forget every component when copying an object
MD5 encryption
剑指Offer(五十二):正则化表达式
.net operation redis sorted set ordered set
1748.唯一元素的和
kali 查看ip地址
Flutter TextField设置高度并且自动换行,圆角边框去除下划线
剑指Offer(九):变态跳台阶
剑指Offer(二十一):栈的压入、弹出序列
在神州IV开发板上成功移植STemWin V5.22
[leetcode daily question 2021/2/18] [detailed explanation] minimum number of turns of 995. K continuous bits
Flutter编译报错 version of NDK matched the requested version 21.0.6113669. Versions available locally: 2
鹏哥C语言20210811程序结构作业
RT-Thread 学习笔记(一)---配置RT-Thread开发环境
RT-Thread 学习笔记(八)---开启基于SPI Flash的elmfat文件系统(下)
如何实现临时的图形要素现实
剑指Offer(二十):包含min函数的栈
Asynctask < T> decoration and await are not used in synchronous methods to obtain asynchronous return values (asynchronous methods are called in synchronous methods)