小编Han*_*ter的帖子

Sort part of a list in descending order (by date), the other part in ascending order (alphabetically)?

I have a control which shows a list of all PDFs in a selected folder. The names of most of these PDFs (for example, meeting minutes) begin with a date. I want these PDFs shown in descending order so that the most recent PDFs are shown at the top.

In the same folder I also have some PDFs whose names do not contain a date (for example, policies). I want these files to be ordered alphabetically.

Here is an example …

c# linq

6
推荐指数
1
解决办法
70
查看次数

在ascx.cs中转换为大写

我目前有以下代码将姓氏的第一个字母转换为大写;

static string UppercaseFirst(string s)
{
    if (string.IsNullOrEmpty(s))
    {
        return string.Empty;
    }
    char[] a = s.ToCharArray();
    a[0] = char.ToUpper(a[0]);
    return new string(a);
}
Run Code Online (Sandbox Code Playgroud)

我现在想要编辑它,以便将姓氏中的所有字母更改为大写.应该是一个简单的,但我的ascx.cs知识是可怕的!:) 谢谢

c# asp.net uppercase

-1
推荐指数
1
解决办法
286
查看次数

标签 统计

c# ×2

asp.net ×1

linq ×1

uppercase ×1