博客
关于我
c# lambda表达式 LINQ
阅读量:344 次
发布时间:2019-03-04

本文共 795 字,大约阅读时间需要 2 分钟。

入门

using System;namespace ConsoleApp5{       class Program    {           static void Main(string[] args)        {               Func
func = new Func
((int a, int b) => { return a + b; }); int result = func(100, 200); // 300 Console.WriteLine(result); func = new Func
((int x, int y) => { return x * y; }); result = func(2, 3); // 6 Console.WriteLine(result); // 简化1 func = new Func
((x, y) => { return x * y; }); // 简化2 func = (x, y) => { return x * y; }; // 简化3 func = (x, y) => (x * y); // 6 Console.WriteLine(func(2, 3)); } }}

进阶

在这里插入图片描述

转载地址:http://vgce.baihongyu.com/

你可能感兴趣的文章
MySQL之DML
查看>>
Mysql之IN 和 Exists 用法
查看>>
MYSQL之REPLACE INTO和INSERT … ON DUPLICATE KEY UPDATE用法
查看>>
MySQL之SQL语句优化步骤
查看>>
MYSQL之union和order by分析([Err] 1221 - Incorrect usage of UNION and ORDER BY)
查看>>
Mysql之主从复制
查看>>
MySQL之函数
查看>>
mysql之分组查询GROUP BY,HAVING
查看>>
mysql之分页查询
查看>>
Mysql之备份与恢复
查看>>
mysql之子查询
查看>>
MySQL之字符串函数
查看>>
mysql之常见函数
查看>>
Mysql之性能优化--索引的使用
查看>>
mysql之旅【第一篇】
查看>>
Mysql之索引选择及优化
查看>>
mysql之联合查询UNION
查看>>
mysql之连接查询,多表连接
查看>>
mysql乐观锁总结和实践 - 青葱岁月 - ITeye博客
查看>>
mysql也能注册到eureka_SpringCloud如何向Eureka中进行注册微服务-百度经验
查看>>