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 …
我目前有以下代码将姓氏的第一个字母转换为大写;
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知识是可怕的!:) 谢谢