• Hi Matt,

    I agree using a static field will force the assembly to be considered as UNSAFE, but diving into the IO system would lead to the same path anyway.

    I use a static field because I need the list to be available outside of the main scope, especially in the fill method. What you will usually see in sqlclr developments is to pass the full object to the fill method, because it is more convenient, but you'll have to call a DriveInfo constructor to get the job done. The idea in this example was to pass a simple array pointing to fixed and ready drives, so you save a call to the object's ctor. And remember a call to the object's ctor will be called every time a row is fetched from the list.

    Appreciate for the comments ,

    David B.