Spin symbols

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 771
Благодарностей
1 184
Баллы
113

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
You can use switch for this case. Generate number 1-3 and depends on the number add to variable necessary data.
 
  • Спасибо
Реакции: СТЕПАН

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 771
Благодарностей
1 184
Баллы
113
You can use switch for this case. Generate number 1-3 and depends on the number add to variable necessary data.
If we talking about workaround then there is ready made version of this.

JavaScript:
Random r = new Random( );
int dash = r.Next(1, 4);
var dash1 = string.Concat(Enumerable.Repeat("-", dash));
return dash1;
Cheers
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)