You say you're using C#, but the code you have is C++ - unless you're intending to use unsafe C# code, which usually isn't necessary.
The C# code would be:
For C++ code or unsafe C# code, I think all you're missing is that you either need:
tag_t part= NULL_TAG;
int test = UF_PART_new(part_name, units, part);
int test = UF_PART_new(part_name, units, &part); //use return value
UF_PART_new(part_name, units, &part); //ignore return value