c# - Good practice for protecting personal information? -


i have property holds personal information. trying figure out best approach guard against kind of privacy violation: heap inspection. have far:

private static securestring _testpi;  public static string testpi {             {             return converttostring(_testpi);       }       set       {             _testpi= converttosecurestring(value);       } } 

as can see have 2 methods converttostring , converttosecurestring. methods name points out convert string taken user or database , converts securestring, converted regular string when property called.

also when class instantiated whatever need class set instance null.

testclass mytest = new testclass(); mytest.testpi= teststring;  validatepi(mytest.testpi); mytest = null;  

is best practice?

i using .net framework 4.5.1


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -