字符串的长度 [英] length of string
本文介绍了字符串的长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有简单的代码,
string m;
m ="这是一个测试字符串" ;;
int l;
l = m.length;
哪个给出错误,
CS0117:''string ''不包含''长度'的定义'
代码有什么问题?
I have the simple code,
string m;
m= "This is a test string";
int l;
l= m.length;
Which give the error,
CS0117: ''string'' does not contain a definition for ''length''
What''s wrong with the code?
推荐答案
C#区分大小写:长度
-
Mickey Williams
作者,Visual C#.NET核心参考 ,MS按
www.neudesic.com
www.servergeek.com
Da *** @ web.com" <沓********* @ discussions.microsoft.com>在消息中写道
news:37 ********************************** @ microsof t.com ...
C# is case sensitive: Length
--
Mickey Williams
Author, "Visual C# .NET Core Ref", MS Press
www.neudesic.com
www.servergeek.com
"Da***@web.com" <Da*********@discussions.microsoft.com> wrote in message
news:37**********************************@microsof t.com...
我有简单的代码,
string m;
m ="这是一个测试字符串" ;;
int l;
l = m.length;
哪个给出错误,
CS0117:''string''不包含''长度的定义''
代码出了什么问题?
I have the simple code,
string m;
m= "This is a test string";
int l;
l= m.length;
Which give the error,
CS0117: ''string'' does not contain a definition for ''length''
What''s wrong with the code?
它是大写的L in:m.Length
" Da *** @ web.com" <沓********* @ discussions.microsoft.com>在消息中写道
news:37 ********************************** @ microsof t.com ...
我有简单的代码,
string m;
m ="这是一个测试string" ;;
int l;
l = m.length;
哪个给出错误,
CS0117:''string''不包含''length'的定义。
代码有什么问题?
It is uppercase L in : m.Length
"Da***@web.com" <Da*********@discussions.microsoft.com> wrote in message
news:37**********************************@microsof t.com...
I have the simple code,
string m;
m= "This is a test string";
int l;
l= m.length;
Which give the error,
CS0117: ''string'' does not contain a definition for ''length''
What''s wrong with the code?
谢谢,
这解决了我的问题。
Shiva写道:
Thanks,
That solved my problem.
"Shiva" wrote:
它是大写的L in:m.Length
Da *** @ web.com <沓********* @ discussions.microsoft.com>在消息中写道
新闻:37 ********************************** @ microsof t.com。 ..
我有简单的代码,
字符串m;
m ="这是一个测试字符串" ;;
int l;
l = m.length;
哪个给出错误,
CS0117:''string''不包含''length'的定义'
代码出了什么问题?
It is uppercase L in : m.Length
"Da***@web.com" <Da*********@discussions.microsoft.com> wrote in message
news:37**********************************@microsof t.com...
I have the simple code,
string m;
m= "This is a test string";
int l;
l= m.length;
Which give the error,
CS0117: ''string'' does not contain a definition for ''length''
What''s wrong with the code?
这篇关于字符串的长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文