Quote:
Originariamente inviato da Mattyfog
che è sta classe? Comunque che non potessi modificare la stringa l'avevo capito solo mi chiedevo perchè e se quindi ci fosse un modo per poterla modificare senza ricorrere ad altre classi... Perchè comunque per le altre stringhe e variabili in generale tutto funzionava tranquillamente....
Quindi: perchè?
Grazie dell'aiuto
|

ma scusa hai mai programmato in C#?
Quote:
|
Originariamente inviato da MSDN
A string is a sequential collection of Unicode characters that is used to represent text. A String object is a sequential collection of System.Char objects that represent a string. The value of the String object is the content of the sequential collection, and that value is immutable.
A String object is called immutable (read-only) because its value cannot be modified once it has been created. Methods that appear to modify a String object actually return a new String object that contains the modification. If it is necessary to modify the actual contents of a string-like object, use the System.Text.StringBuilder class.
|
Quello che vuoi fare tu, ovvero "newoperazione[a] = operazione[a]" non è possibile.
Inoltre Elche ha giustamente notato che stai utilizzando il bitwise OR nelle condizioni dell'if al posto dell'OR normale....