out关键字
来源:互联网 发布:mac系统finder快捷键 编辑:程序博客网 时间:2024/05/21 09:43
out 关键字 获取数组中最大值及索引
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { static int MaxIndex(int[] m_array,out int m_index) { m_index = 0; int m_Max = m_array[0]; for (int i = 0; i < m_array.Length; i++) { if (m_array[i] > m_Max) { m_Max = m_array[i]; m_index = i; } } return m_Max; } static void Main(string[] args) { int[] array = new int[5]{5,9,32,25,16}; int maxIndex; Console.WriteLine("数组中最大的值是:{0}",MaxIndex(array,out maxIndex)); Console.WriteLine("数组中最大值是第{0}号元素:",maxIndex+1); Console.ReadLine(); } }}
- out 关键字
- out关键字
- 关键字out,关键字ref
- out关键字的用法
- C# out关键字
- 关键字 ref和out
- C# out关键字
- 关键字ref和out
- C# out关键字
- C# out关键字
- 参数关键字out,ref
- C# 参数关键字out
- ref out 关键字
- out关键字的用法
- C#中的OUT关键字
- out,ref关键字
- C# ref和out关键字
- C# ref和out关键字
- 使用Mono.Cecil辅助ASP.NET MVC使用dynamic类型Model
- LR中Generation Log、Recording Log和Replay Log日志文件
- [推荐] 一个android个人开发者的总结[问题点数:40分]
- 系统架构-性能篇章1(应用系统性能1)
- android webview js与android互动注意事项
- out关键字
- Jquery实现自以为比较好用的表格工具
- 在线获取ip所属地区的新浪接口
- 系统架构-性能篇章1(应用系统性能2-OOM&参数配置)
- 我自己的.vimrc文件
- 系统架构-性能篇章2(系统拆分1)
- Linux 目录个数和文件个数限制
- Zend Framework教程-MVC-Controller
- jquery 有时候可以载入,有时候无法载入