c# - Mid as target of an assignment -
i try old vb application in c# convert, while i've encountered line of code:
mid(strdata, intposition + 1, intlenght) = strvalue
how can translated c#?
you have combine remove
, insert
, like:
strdata.remove(intposition, intlenght).insert(intposition, strvalue);
the above assumes length of strvalue
equal intlenght
. if strvalue
might longer, replicate mid
statement, need do:
strdata.remove(intposition, intlenght) .insert(intposition, strvalue.substring(0, intlenght));
Comments
Post a Comment