FillChar and Delphi.Net

The old, faithful FillChar function is considered unsafe in a .Net environment and as such is not supported by Delphi.Net.  As understandable as this is, it is a bit of a pain in the backside.  We now seem to be left with no convenient way of initializing arrays.  There is the System.Initialize procedure but from what I can tell from reading the documentation that will work for dynamically allocated arrays and variables but not for static arrays.

Looks like we are left with the old fashioned, but still effective for loop.

Leave a Reply