大众世界 world of demotic + 社区新动力

 找回密码
 注册会员
搜索
查看: 1432|回复: 0

[原创] 编程算法

[复制链接]
发表于 2018-12-17 15:43:08 | 显示全部楼层 |阅读模式
循环索引
[C#] 纯文本查看 复制代码
var i=0;
imageList.Image=imageList.Images[i++ % imageList.Images.Count];//imageList.Images.Count end ==3


i++ % 0=0
i++ % 1=1
i++ % 2=2
i++ % 3=0
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Archiver|手机版|小黑屋|Wod Inc. ( 蜀ICP备20000008号-8

GMT+8, 2024-5-13 08:26 , Processed in 0.095344 second(s), 30 queries .

Powered by Discuz! X3.5

Copyright © 2001-2023 Tencent Cloud.

快速回复 返回顶部 返回列表