KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've done a fair bit of research, but am stuck now as to why I'm still getting this error. I have a struct with the following attributes: struct Account { //private attributes private double mBalance; private int mAccountNumber; private string mName; private string mDateCreated; } and am trying to do the following: class BankManager { //private attributes private unsafe Account *mAccounts; private unsafe bool *mAccountsAvailable; private int mNumberAccounts; } Even after turning my class Account to a struct, using "unsafe" for the attributes in class BankManager, and telling the compiler it can use unsafe code (in properties -> Build), I'm still getting this error at *mAccounts Any ideas as to why? I'm pretty sure all the types I'm using in the struct are legal to have pointers to in c#. Thanks in advance!
Tags (comma-separated)
Save Edits
Cancel