Inserting an integer value in a TextBox

后端 未结 5 1671
臣服心动
臣服心动 2020-12-07 05:37

I need to show an integer value in a TextBox in my C# Windows Forms application (GUI). I have an int32 value available. I could not find a container like a TextBox that take

5条回答
  •  盖世英雄少女心
    2020-12-07 05:56

    Everything in .NET can be transformed to a string in one way or another by using the "ToString()" method.

    Example

    int x = 5;
    string y = x.ToString();
    

提交回复
热议问题