-1
Good evening, developing a program in C# for the first time, I’ve done this program in JS and now I’m learning C# and passing the program to him. I need to check character by character of a variable, in JS I only had to put the variable and the position of the character I wanted to see (variable[0] //first character of the variable). it is possible to do this check in C#? I have a variable with a binary number inside, I need to check in which positions appear the digit 1.
for (var i = 0; i < nums_mapa_bits.length; i++) {
nums_mapa_bits[i] == 1 ? bits_ativos.push(i + 1) : '';
}
the variable 'nums_mapa_bits' is with the binary inside, I want to play this in C#, for now I have not found a way to do this.