当前位置:网站首页>Dictionary and int matrix
Dictionary and int matrix
2022-07-26 10:59:00 【Lovey_ Beihe】
Dictionaries ——Dictionary
Dictionary commonly used methods ——fo'reach loop
foreach (var item in list)
{
//Key Value :item.Key,value Value :item.Value;
// Find the key by the value
if (list.ContainsValue(" value "))
{
item.Key// Find key
}
// Find value by key
if (list.ContainsKey( key ))
{
item.Value// Find value
}
}
int matrix ——int[][]
That is, several arrays form a matrix , First, separate the arrays , Look for the elements of the specific array in each array .
int[][] mat;
for (int i = 0; i < mat.Length; i++)
{
for (int j = 0; j < mat[i].Length; j++)// The first i An array
{
if (mat[i][j] == 1)// The first i The number in the array j Elements
{
}
}
}
边栏推荐
- Minesweeping Pro version 2021-08-19
- Sword finger offer (52): regularization expression
- Software Testing Overview: the background, essence and process of software testing
- Definition and use of C language namespace
- c 语言中宏参数的字符串化跟宏参数的连接
- logging基本使用
- 为什么需要自动化测试?软件测试师带你测评不同软件测试工具
- C#halcon用户控件崩溃的一种处理方法
- Bash shell学习笔记(二)
- Visual conversion of nmap vulnerability scanning results
猜你喜欢

Pre post pytest method

@NotBlank、@NotNull 、@NotEmpty 区别和使用

0x00007ffd977c04a8 (qt5sqld.dll) (in a.exe): 0xc0000005: an access violation occurred when reading position 0x0000000000000010

Why do I need automated testing? Software testers take you to evaluate different software testing tools

Novice source code hashtable

Bash shell learning notes (6)

微信公众号消息通知 “errcode“:40164,“errmsg“:“invalid ip

Newbie sees the source code arraydeque

Pytest execution rules_ Basic usage_ Common plug-ins_ Common assertions_ Common parameters

Bash shell learning notes (III)
随机推荐
Bigdecimal的加减乘除、比较大小、向上向下取整 和 Bigdecimal的集合累加、判断BigDecimal是否有小数
RT thread learning notes (VII) -- open the elmfat file system based on SPI flash (middle)
What are the biz layer and manager layer in the company project
Sword finger offer (V): queue with two stacks
Bash shell learning notes (4)
Toolstrip border removal
3Dunity游戏项目实战——第一人称射击游戏
Kali view IP address
0x00007ffd977c04a8 (qt5sqld.dll) (in a.exe): 0xc0000005: an access violation occurred when reading position 0x0000000000000010
智能合约dapp系统开发流程技术
@Notblank, @notnull, @notempty differences and uses
LE Audio规范概述
菜鸟看源码之ArrayDeque
Solve the problem of the popularity of org.apache.commons.codec.binary.base64
Sword finger offer (52): regularization expression
Shape matching Halcon template
BLE之ATT请求
Esxi6.5 patch update
ThreadPoolExecutor是怎样执行任务的
HCI 接口