Why does Firebase docs have this listed as an option on https://firebase.google.com/docs/database/unity/save-data?
Here is my code and error
public class User2
{
public string email;
public string myAge;
public string mySex;
public string myEth;
public string myReligion;
public string myJob;
public string myKids;
public string myFKids;
public string myCovid;
public string myHeight;
public string myWeight;
public string myEye;
public string theirMinAge;
public string theirMaxAge;
public string theirSex;
public string theirEth;
public string theirReligion;
public string theirJob;
public string theirKids;
public string theirFKids;
public string theirCovid;
public string theirHeight;
public string theirWeight;
public string theirEye;
public User2 ()
{
}
public string User2 (string email1, string myAge1,
string mySex1,
string myEth1,
string myReligion1,
string myJob1,
string myKids1,
string myFKids1,
string myCovid1,
string myHeight1,
string myWeight1,
string myEye1,
string theirMinAge1,
string theirMaxAge1,
string theirSex1,
string theirEth1,
string theirReligion1,
string theirJob1,
string theirKids1,
string theirFKids1,
string theirCovid1,
string theirHeight1,
string theirWeight1,
string theirEye1)
{
this.email = email1;
this.myAge = myAge1;
this.mySex = mySex1;
this.myEth = myEth1;
this.myReligion = myReligion1;
this.myJob = myJob1;
this.myKids = myKids1;
this.myFKids = myFKids1;
this.myCovid = myCovid1;
this.myHeight = myHeight1;
this.myWeight = myWeight1;
this.myEye = myEye1;
this.theirMinAge = theirMinAge1;
this.theirMaxAge = theirMaxAge1;
this.theirSex = theirSex1;
this.theirEth = theirEth1;
this.theirReligion = theirReligion1;
this.theirJob = theirJob1;
this.theirKids = theirKids1;
this.theirFKids = theirFKids1;
this.theirCovid = theirCovid1;
this.theirHeight = theirHeight1;
this.theirWeight = theirWeight1;
this.theirEye = theirEye1;
}
}
and my error
Assets\Scripts\Buttons.cs(46,19): error CS0542: 'User2': member names cannot be the same as their enclosing type
When I change the name of User2 inside the class, i get another error.
please declare the return type of the method.
Is there an easy solution for this?
I found my error.. I had the keyword string in one of methods. solving.
I found my error. I had the keyword string in one of the methods.