Jump to content
Tuts 4 You

Why not change field bool ?


Recommended Posts

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?

Link to comment
  • 2 weeks later...
byte[] fake = BitConverter.GetBytes(true) -- fine

Array.Resize(ref fake, (int)tdFlds.GetFieldSize()); --why to resize it ? possible here you destroy it 


Link to comment
  • 1 month later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...