码迷,mamicode.com
首页 >  
搜索关键字:linq datatable    ( 9174个结果
使用ASP.NET Treeview显示数据库里DataTable里的数据。
<%@ Page Language="C#" AutoEventWireup="true" %> <%@ Import Namespace="System.Data" %> <!DOCTYPE html> <script runat="server"> protected void Page_Loa ...
分类:数据库   时间:2020-07-04 15:01:29    阅读次数:61
巧用 linq select 实现遍历集合返回元素 index
集合元素如下: private List<string> dataSource = new List<string>() { "001", "002", "003", "004", "005" }; C# 代码,之前这样写: public void Run_v1() { var index = 0; ...
分类:其他好文   时间:2020-07-04 13:21:37    阅读次数:97
C# XDocument
XDocument 说明LINQ处理XML文件的一个类 添加引用 using System.Linq; using System.Xml.Linq; using System.Xml.XPath; 引用xml文件 XDocument xml = XDocument.Load("IOS.xml"); ...
分类:Windows程序   时间:2020-07-03 15:22:41    阅读次数:86
C# 对List<T>进行排序
1、使用Sort() 当T是简单类型,int,double之类的可以直接用 var a = new List<int>(); a.Add(1); a.Add(5); a.Add(4); a.Sort();//排序 2、使用LinQ a = a.OrderByDescending(i => i.Nam ...
分类:编程语言   时间:2020-07-02 10:41:55    阅读次数:56
红包逻辑
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks; using ServiceStack.Redis; namespace te ...
分类:其他好文   时间:2020-07-01 09:36:28    阅读次数:65
Linq的分页查询
public PageInfo Get(string name, int PageIndex = 1, int PagepSize = 3) { PageInfo pg = new PageInfo(); if (name == null) { name=""; } int count = pg.D ...
分类:其他好文   时间:2020-06-30 20:25:06    阅读次数:48
基于DataTable, Json的额外序列化数据
最近很多功能都涉及到用户设置相关的东西, 比如一个沙盘, 希望在无操作后3秒钟就自动进行相机自动旋转的操作, 代码很简单: public class XXX : MonoBehaviour { public float cameraRotateSpeed = 2f; public float wai ...
分类:Web程序   时间:2020-06-28 18:51:33    阅读次数:58
Linq下有一个非常实用的SelectMany方法,很多人却不会用
在平时开发中经常会看到有些朋友或者同事在写代码时会充斥着各种for,foreach,这种程式代码太多的话阅读性特别差,而且还显得特别累赘,其实在FCL中有很多帮助我们提高阅读感的方法,而现实中很多人不会用或者说不知道,这篇我就跟大家聊一聊。 一:SelectMany 这个方法绝对是提高开发速度的一大 ...
分类:其他好文   时间:2020-06-28 18:07:52    阅读次数:67
Salesforce LWC学习(十八) datatable展示 image
本篇参看: https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/documentation https://www.lightningdesignsystem.com/component ...
分类:其他好文   时间:2020-06-28 15:27:38    阅读次数:61
Linq语句OrderBy的使用
1.从大到小(DESC) list_Subject_set = list_Subject.OrderByDescending(p => p.ManagerName).ToList(); 2.从小到大(ASC) list_Subject_set = list_Subject.OrderBy(p => ...
分类:其他好文   时间:2020-06-28 13:33:48    阅读次数:55
9174条   上一页 1 ... 13 14 15 16 17 ... 918 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!