A field initializer cannot reference the nonstatic field, method, or property

前端 未结 4 903
小鲜肉
小鲜肉 2020-11-22 02:31

I have a class and when I try to use it in another class I receive the error below.

using System;
using System.Collections.Generic;
using System.Linq;

name         


        
4条回答
  •  清酒与你
    2020-11-22 03:11

    you can use like this

    private dynamic defaultReminder => reminder.TimeSpanText[TimeSpan.FromMinutes(15)]; 
    

提交回复
热议问题