I am trying to re-write a part of my application from ATL/COM(C++) to WPF, C#. In the older application they use
m_inputFile = new CFile(fileName,CFile::modeRead);
DWORD fileLength= (DWORD) m_inputFile->GetLength();
But when I use FileInfo.Length in C# application, this gives incorrect value. What is the correct way to implement logical length of file in C#? Any advise is greatly appreciated.