CS0120: An object reference is required for the nonstatic field, method, or property 'foo'

前端 未结 7 1110
挽巷
挽巷 2020-11-21 04:34

Consider:

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            


        
7条回答
  •  南方客
    南方客 (楼主)
    2020-11-21 05:27

    From my looking you give a null value to a textbox and return in a ToString() as it is a static method. You can replace it with Convert.ToString() that can enable null value.

提交回复
热议问题