سلام بر تمامی برنامه نویسان سی شارپ 😉 در این مطلب از وب سایت پروگرم 98 کد مقداردهی ویژگی Length (طول) برای StringBuilder در سی شارپ #C را آماده کردم. امیدوارم که این کد برای شما مفید باشد.
خروجی کد به این صورت می باشد :
The result is: 'test string'
The length is: 11
The result is: 'test'
The length is: 4
The result is: 'test '
The length is: 20
The length is: 11
The result is: 'test'
The length is: 4
The result is: 'test '
The length is: 20
کد مقداردهی ویژگی Length (طول) برای StringBuilder در سی شارپ #C :
using System;
using System.Text;
class MainClass
{
public static void Main()
{
StringBuilder sb = new StringBuilder("test string");
int length = 0;
length = sb.Length;
using System.Text;
class MainClass
{
public static void Main()
{
StringBuilder sb = new StringBuilder("test string");
int length = 0;
length = sb.Length;