ToTitleCase方法不起作用 [英] ToTitleCase method not working
问题描述
我的基页有以下代码:
私有tInfo As TextInfo = New CultureInfo(" en-US",False).TextInfo
受保护的函数TitleIt(ByVal输入为字符串)字符串
返回tInfo.ToTitleCase(输入)
结束函数
我这样实现它:
UsersName.Text = TitleIt(currentUser.fullName)
它简直就是回复标题:
?输入
WILLIAM SEMPF
?TitleIt
WILLIAM SEMPF
我已经注意到了一些关于
这个网络的近期其他未答复的帖子。最近的服务包打破全球化? ToLower工作正常:
?输入
WILLIAM SEMPF
?TitleIt
william sempf
欢迎结识。
S
"双** @ sempf.net.nospam" < bi **************** @ discussion.microsoft.com>
schrieb:私有tInfo As TextInfo = New CultureInfo(en-US,
False).TextInfo
受保护的函数TitleIt(ByVal输入为字符串)As String
返回tInfo.ToTitleCase(输入)
结束功能
我正在这样实现:
UsersName.Text = TitleIt(currentUser.fullName)
它简直就是'返回标题的东西:
?输入
WILLIAM SEMPF
?TitleIt
WILLIAM SEMPF
Mhm ...您的代码在我的德语Windows XP Professional SP2 +
..NET 1.1 SP1机器上工作正常。
-
MS Herfried K. Wagner
MVP< URL:http://dotnet.mvps.org/>
VB < URL:http://classicvb.org/petition/>
Bill,
我希望我理解你。在哪里写文化的东西
反映了日期和数值旁边的自然语言行为?我没听说过,所以如果是这样的话,那我就非常感兴趣了。
为了得到合适的案例,你可以使用VisualBasic方法对于
那个。
http://msdn.microsoft.com/library/de...fctstrconv.asp
我很好奇并且希望最后一部分有所帮助,
Cor
OOP找到它
< br $> b $ b抱歉
Cor
I have the following cod ein my base page:
Private tInfo As TextInfo = New CultureInfo("en-US", False).TextInfo
Protected Function TitleIt(ByVal input As String) As String
Return tInfo.ToTitleCase(input)
End Function
And I am implementing it like this:
UsersName.Text = TitleIt(currentUser.fullName)
And it simply isn''t returning title cased stuff:
?Input
"WILLIAM SEMPF"
?TitleIt
"WILLIAM SEMPF"
I have noticed a few other recent unanswered posts around the ''net about
this. Recent service pack break Globalization? ToLower works just fine:
?Input
"WILLIAM SEMPF"
?TitleIt
"william sempf"
Thoughts welcome.
S
"bi**@sempf.net.nospam" <bi****************@discussions.microsoft.com>
schrieb:Private tInfo As TextInfo = New CultureInfo("en-US",
False).TextInfo
Protected Function TitleIt(ByVal input As String) As String
Return tInfo.ToTitleCase(input)
End Function
And I am implementing it like this:
UsersName.Text = TitleIt(currentUser.fullName)
And it simply isn''t returning title cased stuff:
?Input
"WILLIAM SEMPF"
?TitleIt
"WILLIAM SEMPF"
Mhm... Your code works just fine on my German Windows XP Professional SP2 +
..NET 1.1 SP1 machine.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Bill,
I hope that I understand you. Where is written that the culture stuff
reflects on natural language behaviour beside dates and numeric values? I
never heard of that so if that is, than I am very interested.
To get the proper case you can be the way use that VisualBasic method for
that.
http://msdn.microsoft.com/library/de...fctstrconv.asp
I am curious and hope that the last part helps,
Cor
OOPs found it
Sorry
Cor
这篇关于ToTitleCase方法不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!