ref使用
来源:互联网 发布:鲁迅 两棵枣树 知乎 编辑:程序博客网 时间:2024/05/15 10:08
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TestInterface
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
xx dd = new xx();
List<int> listInt = new List<int>();
ITestDemo it = new xx();
listInt.Add(11);
it.sss(ref listInt);
var xx = from a in listInt
group a by a % 2 into w
select new
{
aa = 1,
bb = w.Key.ToString()
};
var xx1 = from b in listInt
let iseven = b % 2 == 0 ? true : false
where iseven
select b;
MessageBox.Show(listInt.ToString());
}
}
public interface ITestDemo
{
void sss(ref List<int> listInt);
}
public class xx : ITestDemo
{
public void sss(ref List<int> listInt1)
{
List<int> listInt = new List<int>();
listInt.Add(1);
listInt.Add(2);
listInt.Add(3);
listInt.Add(4);
listInt.Add(5);
//listInt.Add("文字");
//listInt.Add("1111");
listInt1.AddRange(listInt);
listInt1[0] = 22;
}
}
}
- ref使用
- SMIL 中的ref使用
- c# out ref 使用
- c# ref参数使用
- Oracle ref cursor使用
- C#ref 使用
- Oracle ref cursor使用
- <ref bean>使用注意事项
- Oracle ref cursor使用
- REF的使用
- vue-ref使用
- ref 的使用。
- ref和out的使用
- 使用ref和out参数
- c# ref out 的使用
- 使用ref参数传递数据
- Oracle使用REF 动态游标
- 使用ref和out参数
- Webscan360的防御与绕过
- Unable to list target platforms. When I try to build to Andriod on Mac
- 解决Eclipse中无法查看Java源码
- 自定义CheckBox
- [译]Java定时任务调度-Quartz文档(十)Configuration, Resource Usage and SchedulerFactory
- ref使用
- js中==与===的区别
- php根据时间戳获取今天,昨天,周几,几月几号的时间形式
- Python修改文件权限
- 面试技巧及注意事项
- LeetCode:507. Perfect Number
- 盈鹏飞嵌入式-EVB-T335(AM335) debian系统USB无线网卡移植手册
- Thinkphp框架任意代码执行漏洞利用及修复
- select跳转菜单新窗口打开