r3xq1 Posted November 4, 2021 Posted November 4, 2021 foreach (FieldDef tdFlds in tdType.Fields) { if (tdFlds.ElementType == ElementType.End) { if (tdFlds.Name == "MyField") { byte[] fake = BitConverter.GetBytes(true); // set true Array.Resize(ref fake, (int)tdFlds.GetFieldSize()); tdFlds.InitialValue = fake; } } } How can the bool field be changed?
whoknows Posted November 14, 2021 Posted November 14, 2021 byte[] fake = BitConverter.GetBytes(true) -- fine Array.Resize(ref fake, (int)tdFlds.GetFieldSize()); --why to resize it ? possible here you destroy it
r3xq1 Posted December 29, 2021 Author Posted December 29, 2021 On 11/14/2021 at 11:32 PM, whoknows said: byte[] fake = BitConverter.GetBytes(true) -- fine Just this not work!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now