一个简单的问题 C#中,取字符串长度的函数是什么呢?一时忘了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 String.Length 属性 不是方法 没什么方法你用 Length 直接获取啊string s = "abc";int i = s.Length;i 就是长度 整数长度?比如369你是说看作字符串的长度还是整数本身的长度 如果是后者 没有这个概念只有int32的范围Int32 值类型表示值介于 -2,147,483,648 到 +2,147,483,647 之间的有符号整数。 麻烦帮我看下这代码哪里错 void page_load( object sender,EventArgs e) { if (!IsPostBack) { int IntCount,IntActive; int i, j, theLen; IntCount = Convert.ToInt32(Application["currcount"]); IntActive = Convert.ToInt32(Application["active"]); theLen =IntCount.length; int i=1; while (theLen) { str1=Mid(Trim(IntCount),1,1); Image pict=new Image(); pict.Width=13; pict.Height=21; pict.ImageUrl="images/numeric" &Trim(str1)& ".gif" ; PlaceHolder1.control.add(pict); } theLen=Len(Trim( IntActive)); int i=1; while (theLen) { str1 = Mid(Trim(IntActive), 1, 1); Image pict = new Image(); pict.Width = 13; pict.Height = 21; pict.ImageUrl = "images/numeric" & Trim(str1) & ".gif"; PlaceHolder2.control.add(pict); } } } </script>编译器错误信息: CS0117: “int”并不包含“length”的定义theLen =IntCount.length; IntCount 是 int 类型没有 length 属性theLen = IntCount.ToString().Length;注意是 Length 不是 length 请问有没有在C#中,可以编辑的Date控件? c# 遍历Windows CE中的进程 使用visa控制仪表过程中遇到的问题,大牛进~ 关于SuspendLayout方法 求一个provider。convert.ToString(int16,provider) 有关水晶报表的问题 问一个简单的lock问题 c# 接口与类 对象之间的转换 【动态生成DataGrid】 SmartNavigaiton 的问题,求助! VC++与VC#之间数据类型怎么转换? VS.net2005编写SQL SERVER2005扩展存储过程的问题
你用 Length 直接获取啊
string s = "abc";
int i = s.Length;
i 就是长度
比如369
你是说看作字符串的长度
还是整数本身的长度 如果是后者 没有这个概念
只有int32的范围
Int32 值类型表示值介于 -2,147,483,648 到 +2,147,483,647 之间的有符号整数。
void page_load( object sender,EventArgs e)
{
if (!IsPostBack)
{
int IntCount,IntActive;
int i, j, theLen;
IntCount = Convert.ToInt32(Application["currcount"]);
IntActive = Convert.ToInt32(Application["active"]);
theLen =IntCount.length;
int i=1;
while (theLen)
{ str1=Mid(Trim(IntCount),1,1);
Image pict=new Image();
pict.Width=13;
pict.Height=21;
pict.ImageUrl="images/numeric" &Trim(str1)& ".gif" ;
PlaceHolder1.control.add(pict);
}
theLen=Len(Trim( IntActive));
int i=1;
while (theLen)
{
str1 = Mid(Trim(IntActive), 1, 1);
Image pict = new Image();
pict.Width = 13;
pict.Height = 21;
pict.ImageUrl = "images/numeric" & Trim(str1) & ".gif";
PlaceHolder2.control.add(pict);
}
}
}
</script>编译器错误信息: CS0117: “int”并不包含“length”的定义theLen =IntCount.length;
没有 length 属性
theLen = IntCount.ToString().Length;
注意是 Length 不是 length