我必须使用$scope.hasAuthority = function(auth){
//code to check if localstorage has needed permission
//return true or false
}
在文本文件上写一些文字。
我的代码如下:
TextWriter
它在指定路径创建了文本文件,但该文本文件中没有值。我有一个空文件。
如何使用static void Main(string[] args)
{
List<int> _list_1 = new List<int>() { 1, 2, 3, 4 };
List<int> _list_2 = new List<int>() { 5, 6, 7, 8 };
var _year = 2005;
var _root = @"C:\Users\~\Results";
var _path = Path.Combine(_root, _year.ToString());
var _testFile = _year.ToString() + " - IntegerLists.txt";
_path = Path.Combine(_root, _year.ToString());
if (!Directory.Exists(_path))
{
Directory.CreateDirectory(_path);
}
Console.WriteLine("Writing lists on text file...");
TextWriter _tw = File.CreateText(Path.Combine(_path, _testFile));
for ( int _i = 0; _i < _list_1.Count; _i++ )
{
_tw.WriteLine("List - 1 : {0}, List - 2 : = {1}", _list_1[_i], _list_2[_i]);
}
Console.WriteLine("Lists have been written on text file.");
Console.ReadLine();
}
撰写文字?