这段代码小弟看不太懂,请大家帮我分析一下它实现什么功能,怎么实现的?
private static byte[] GetFilePath(string FileName)
{
TC_INI_TYPE SysInfo = new TC_INI_TYPE();
char[] TmpFName = new char[128];
byte[] FName = new byte[128];
long Pos = 0;
long tmp = 0;
D1.GetSysInfo(ref SysInfo);
SysInfo.cbDir.CopyTo(TmpFName, 0);
Pos = SysInfo.cbDir.LongLength;
for(short j=0; j<Pos; j++)
{
if(SysInfo.cbDir[j] != 0)
tmp++;
}
Pos = tmp;
//Pos = (long)TmpFName.Length;
@"Voc\".ToCharArray().CopyTo(TmpFName, Pos);
FileName.ToCharArray().CopyTo(TmpFName, Pos+4);
short i = 0;
for(i=0; i<TmpFName.Length; i++)
{
FName[i] = (byte)TmpFName[i];
}
return FName;
}
特别是@"Voc\".ToCharArray().CopyTo(TmpFName, Pos);
FileName.ToCharArray().CopyTo(TmpFName, Pos+4);
好象满关键可小弟不明白是什么意思!
@"Voc\".ToCharArray().CopyTo(TmpFName, Pos)的意思