System.IO.IsolatedStorage.TestHelper.CreateTestFile C# (CSharp) Méthode

CreateTestFile() public static méthode

Simple wrapper to create the given file (and close the handle)
public static CreateTestFile ( this isf, string fileName, string content = null ) : void
isf this
fileName string
content string
Résultat void
        public static void CreateTestFile(this IsolatedStorageFile isf, string fileName, string content = null)
        {
            using (var stream = isf.CreateFile(fileName))
            {
                if (content != null)
                    stream.WriteAllText(content);
            }
        }