下面是我的代码,我怎样才能使if
返回为真,因为它当前跳过if
语句,因为字符串值中有一个空格。
string instrucType = "FM";
string tenInstrucType = "FM ";
if (tenInstrucType.Equals(instrucType))
{
blLandlordContactNumberHeader.Visible = true;
lblLandlordContactNumber.Text = landlordData.LandlordContact.DefPhone;
lblLandlordEmailHeader.Visible = true;
lblLandlordEmail.Text = landlordData.LandlordContact.DefEmail;
}