General information
Category:
Coding, syntax and commands
>Thanks, Viv, for pointing me in the right direction.
>I finally got to that step this AM.
>Other restraints in the system limit the number of versions to 10, starting with "A", so I just needed to increment it.
>
>Here's another question:
>
>This works
> private void buttonCreatenewversion_Click(object sender, EventArgs e)
> {
> char c = Convert.ToChar(CurrentVersion);
> c++;
> string newversion = c.ToString();
>
> } // key down
>
>
>This gives me the existing version. Why is that??
>
> private void buttonCreatenewversion_Click(object sender, EventArgs e)
> {
> char c = Convert.ToChar(CurrentVersion);
> string newversion = c++.ToString();
>
> } // key down
Like Bonnie said: use (++c).ToString();
c++ will increment c *after* using the value.
++c will increment c *before* using the value.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only