PDA

View Full Version : ComboBox Values -- Length is always 1024



Daniel.Dority
07-31-2008, 10:55 AM
Why is every value that I return from a combo value is padded to the length of 1024?

I am using C# for custom actions and I just figured out why every method is failing. What is being appended? Spaces? Returns?

I ask because in certain instances, .Trim() does NOT remove the excess characters which is a problem.

What needs to happen to resolve this?

Daniel.Dority
07-31-2008, 11:46 AM
Through several rounds of testing, Installshield is padding the data with nulls.

To fix the problem I created a method which will clean it up.

private string SanitizeInstallShield(string data)
{
return data.Replace("\0", string.Empty);
}