App_Code/FileContent.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.IO;
using System.Text;
/// <summary>
/// 模板对象。
/// </summary>
public class FileContent
{
private FileContent(string path)
{
this.path = path;
lastUpdateTime = File.GetLastWriteTime(path);
}
/// <summary>
/// 文本内容。
/// </summary>
private string Content;
/// <summary>
/// 最后更新时间。
/// </summary>
private DateTime lastUpdateTime;
/// <summary>
/// 文件路径。
/// </summary>
private string path;
/// <summary>
/// 判断文本是否已经修改。
/// </summary>
private bool IsChanged
{
get
{
if (this.lastUpdateTime != File.GetLastWriteTime(this.path))
{
return true;
}
return false;
}
}
/// <summary>
/// 文本信息。
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
public static FileContent GetContent(string path)
{
using (StreamReader reader = new StreamReader(path, Encoding.UTF8))
{
FileContent content = new FileContent(path);
StringBuilder sb = new StringBuilder();
string line = reader.ReadLine();
后面还有 35 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。