I am encountering this same error on the following fields:
public string txnumber { get; set; }
public string qnumber { get; set; }
public string accountnumber { get; set; }
public decimal amount { get; set; }
public string emailaddress { get; set; }
this is defined in the class Txn.cs.
The error text for all the variables is:
Severity Code Description Project File Line Suppression State Warning CS0108 'ReadTxn.txnumber' hides inherited member 'Txn.txnumber'. Use the new keyword if hiding was intended. QAny Severity Code Description Project File Line Suppression State Warning CS0108 'ReadTxn.txnumber' hides inherited member 'Txn.txnumber'. Use the new keyword if hiding was intended. QAny C:\Users\user\source\repos\QAny\QAny\Models\Txn.cs 37
Active Warning CS0108 'ReadTxn.qnumber' hides inherited member 'Txn.qnumber'. Use the new keyword if hiding was intended. QAny C:\Users\user\source\repos\QAny\QAny\Models\Txn.cs 38
Active Warning CS0108 'ReadTxn.accountnumber' hides inherited member 'Txn.accountnumber'. Use the new keyword if hiding was intended. QAny C:\Users\user\source\repos\QAny\QAny\Models\Txn.cs 39
Active Warning CS0108 'ReadTxn.amount' hides inherited member 'Txn.amount'. Use the new keyword if hiding was intended. QAny C:\Users\user\source\repos\QAny\QAny\Models\Txn.cs 40
Active Warning CS0108 'ReadTxn.emailaddress' hides inherited member 'Txn.emailaddress'. Use the new keyword if hiding was intended. QAny C:\Users\user\source\repos\QAny\QAny\Models\Txn.cs 41
======== here is the Txn.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace QAny.Models
{
public class Txn
{
// define all the proeperties of the table with get and set
public string txnumber { get; set; }
public string qnumber { get; set; }
public string accountnumber { get; set; }
public decimal amount { get; set; }
public string emailaddress { get; set; }
}
// will create a class to create an object of txn class
public class createTxn : Txn
{
}
public class ReadTxn : Txn
{
public ReadTxn(System.Data.DataRow row)
{
txnumber = row["txnumber"].ToString();
qnumber = row["qnumber"].ToString();
accountnumber = row["accountnumber"].ToString();
amount = Convert.ToDecimal(row["amount"]);
emailaddress = row["emailaddress"].ToString();
}
public string txnumber { get; set; }
public string qnumber { get; set; }
public string accountnumber { get; set; }
public decimal amount { get; set; }
public string emailaddress { get; set; }
}
}