using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace IReaper.CourseData{
/// <summary>
///
/// ID,.
///
/// </summary>
[StructLayout(LayoutKind.Sequential,Pack=4)]
public unsafe struct CourseRecordStorage
{
#region fields
/// <summary>
/// ID
/// </summary>
fixed char id[16];
/// <summary>
///
/// </summary>
long updatedTime;
#endregion
#region Attirbutes
/// <summary>
/// ID
/// </summary>
public string ID
{
get
{
fixed (char* tpID = id)
{
return new string(tpID);
}
}
set
{
fixed (char* tpID = id)
{
for (int i = 0; i < 15 && i < value.Length ; i++)
{
tpID[i] = value[i];
}
}
}
}
/// <summary>
///
/// </summary>
public DateTime UpdatedTime
{
get
{
return new DateTime(this.updatedTime);
}
set
{
updatedTime = value.Ticks;
}
}
#endregion
}
}
|