07-12-2012، 12:10 PM
(آخرین تغییر در ارسال: 07-12-2012، 12:11 PM توسط Amin_Mansouri.)
The Length property in String Class returned the number of characters occurred in a String.
int string.length
Returns:
Integer : The number of characters in the specified String
example:
"This is a Test".Length returns 14.
مثال:
کد:
using System;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string str = null;
str = "This is a Test";
MessageBox.Show(str.Length.ToString());
}
}
}
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg