Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have this string
%1111_Ç2222_Ç3333_
and I want remove the characters between the first and second _
Ç2222_
What is the best way to do this?
Thanks
maybe you want to go into this direction, but your question is not that clear...
string sIn = "%1111_Ç2222_Ç3333_";
string sOut = string.Join("_", sIn.Split('_').Where((x, index) => index != 1));
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have a string like this:
var mystring = ',32,33,34,35,36'
How can I call a method for each value?
There are many ways to do that.
For ex:
foreach (string i in mystring.split(','))
callYourFunction(i);
Does this suits you?
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
How can i assign automatically the Transform via code using something like GameObject.FindObjectOfType?
raycastEnd = GameObject.Find("RaycastEnd").transform;
If you have multiple objects named "RaycastEnd" it will return the first one. the first one may be unpredictable.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Sorry, I've just started programming in C#. I would like to know what's the easiest way to read a character or characters from the console and store the value into a variable to be written to the console at a later point.
Thank you!
That would be:
string input = Console.ReadLine();
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
does an equivalent of the javascript Array.some() function exist in c#?
Yes there is: Any
var foo = new object[10];
var some = foo.Any(x => x != null);
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I would like to find the start position of the following in a string:
{UPPERCASESTRINGINANYLENGTH(
What is the fastest way of doing that? Thanks
You can;
foreach (Match match in Regex.Matches(" {AAA(1)} {XXX(2)} ", #"\{[A-Z]+\("))
{
if (match.Success)
int pos = match.Index;