ok, now how do i add six " " into a string by multiplying it
-
hey, how can i add six " " (white spaces) into a string by doing it like " " * 6; six is just an example, because the number will change... thanks
plz try it.......... Dim s As New System.Text.StringBuilder s.Append("a") s.Append(" ", CountNumber) s.Append("b")
Parwej Back...............DON of Developer....... Parwej Ahamad g_parwez@rediffmail.com
-
plz try it.......... Dim s As New System.Text.StringBuilder s.Append("a") s.Append(" ", CountNumber) s.Append("b")
Parwej Back...............DON of Developer....... Parwej Ahamad g_parwez@rediffmail.com
-
hey, how can i add six " " (white spaces) into a string by doing it like " " * 6; six is just an example, because the number will change... thanks
Roman957 wrote:
add six " " (white spaces) into a string by doing it like " " * 6
ofcourse no " " is not a number so you can not multiply it by 6 you can use a for loop
//identify the number of spaces you want by assigning it to count int count = 6; String str; for( int i = 0; i < count; i++) { str += " "; }
-
try.......... System.Text.StringBuilder s=new System.Text.StringBuilder(); s.Append("a"); s.Append(" ", CountNumber); s.Append("b");
Parwej Back...............DON of Developer....... Parwej Ahamad g_parwez@rediffmail.com
-
hey, how can i add six " " (white spaces) into a string by doing it like " " * 6; six is just an example, because the number will change... thanks
-
hey, how can i add six " " (white spaces) into a string by doing it like " " * 6; six is just an example, because the number will change... thanks
-
hey, how can i add six " " (white spaces) into a string by doing it like " " * 6; six is just an example, because the number will change... thanks
you could create a FakeString class. add implicit casts between FakeString and String and also overload String * int, string *long. not forgetting to overload int * String and long * String. It doesn't sound worth it in this instance but if " " was of type vector for instance, it might well be. Russ
-
hey, how can i add six " " (white spaces) into a string by doing it like " " * 6; six is just an example, because the number will change... thanks
int count = 6; char space = ' '; StringBuilder st = new StringBuilder("Your String"); st.Append(space, count);