我已经用{get; set;}设置了类的所有属性,每次我点击generate构造函数,它都会给我这个消息:游标必须位于构造函数调用中。我也无法找到关于此消息的任何信息。在Visual Studio中生成构造函数C#不起作用...为什么?
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ISYAbschlussProjektJ
{
public class Loan
{
public string bank { get; set; }
public double amount { get; set; }
public double rate { get; set; }
public string address { get; set; }
public string phonenumber { get; set; }
public string email { get; set; }
public string aktenzeichen { get; set; }
public string iban { get; set; }
public string bic { get; set; }
public string betreuer { get; set; }
public DateTime deductiondate { get; set; }
public DateTime startdate { get; set; }
}
}
给我们看一些代码。你有什么尝试? – Nino
我认为这是说你需要写一个构造函数调用,例如'新的MyClass(“one”,2)'和VS可以生成一个具有适当参数的构造函数。 –
究竟是什么参数?我在哪里添加这个?谢谢:) – jasminrandom