WmptWap/App_LocalResources/Listsort.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;


/// <summary>
/// IList排序类
/// </summary>
/// <typeparam name="T"></typeparam>
public class IListSort<T>
{
    private string _propertyName;
    private bool _sortBy = true;
    private IList<T> _list;

    /// <summary>
    /// 构造函数
    /// </summary>
    /// <param name="list">排序的Ilist</param>
    /// <param name="propertyName">排序字段属性名</param>
    /// <param name="sortBy">true升序 false 降序 不指定则为true</param>
    public IListSort(IList<T> list, string propertyName, bool sortBy)
    {
        _list = list;
        _propertyName = propertyName;
        _sortBy = sortBy;
    }

    /// <summary>
    /// 构造函数
    /// </summary>
    /// <param name="list">排序的Ilist</param>
    /// <param name="propertyName">排序字段属性名</param>
    /// <param name="sortBy">true升序 false 降序 不指定则为true</param>
    public IListSort(IList<T> list, string propertyName)
    {
        _list = list;
        _propertyName = propertyName;
        _sortBy = true;
    }

    /// <summary>
    /// IList
    /// </summary>
    public IList<T> List
    {
        get { return _list; }
        set { _list = value; }
    }

    /// <summary>
    /// 排序字段属性名
    /// </summary>
    public string PropertyName
    {
        get { return _propertyName; }
        set { _propertyName = value; }
    }

后面还有 128 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。