¡@

Home 

c# Programming Glossary: fileinfo

Nested using statements in C#

http://stackoverflow.com/questions/1329739/nested-using-statements-in-c-sharp

di new DirectoryInfo Environment.CurrentDirectory TestArea FileInfo files di.GetFiles filename . FileInfo outputFile files.Where.. TestArea FileInfo files di.GetFiles filename . FileInfo outputFile files.Where f f.Extension .out .Single FileInfo FileInfo.. FileInfo outputFile files.Where f f.Extension .out .Single FileInfo FileInfo expectedFile files.Where f f.Extension .exp .Single..

C# - How to get Program Files (x86) on Windows Vista 64 bit

http://stackoverflow.com/questions/194157/c-sharp-how-to-get-program-files-x86-on-windows-vista-64-bit

get Program Files x86 on Windows Vista 64 bit I'm using FileInfo System.Environment.GetFolderPath System.Environment.SpecialFolder.ProgramFiles..

Natural Sort Order in C#

http://stackoverflow.com/questions/248603/natural-sort-order-in-c-sharp

or provide a sample of a natural order sort in C# for an FileInfo array I am implementing the IComparer interface in my sorts... a b public sealed class NaturalFileInfoNameComparer IComparer FileInfo public int Compare FileInfo a.. public sealed class NaturalFileInfoNameComparer IComparer FileInfo public int Compare FileInfo a FileInfo b return SafeNativeMethods.StrCmpLogicalW..

GetFiles with multiple extentions [duplicate]

http://stackoverflow.com/questions/3527203/getfiles-with-multiple-extentions

How do you filter on more than one extension I've tried FileInfo Files dinfo.GetFiles .jpg .tiff .bmp FileInfo Files dinfo.GetFiles.. I've tried FileInfo Files dinfo.GetFiles .jpg .tiff .bmp FileInfo Files dinfo.GetFiles .jpg .tiff .bmp c# .net system.io fileinfo.. method That's more readable. public static IEnumerable FileInfo GetFilesByExtensions this DirectoryInfo dir params string extensions..

Get File Icon used by Shell

http://stackoverflow.com/questions/462270/get-file-icon-used-by-shell

In .Net C# or VB don't care given a file path string FileInfo struct or FileSystemInfo struct for a real existing file how..

How do I convert Word files to PDF programmatically?

http://stackoverflow.com/questions/607669/how-do-i-convert-word-files-to-pdf-programmatically

DirectoryInfo dirInfo new DirectoryInfo @ server folder FileInfo wordFiles dirInfo.GetFiles .doc word.Visible false word.ScreenUpdating.. .doc word.Visible false word.ScreenUpdating false foreach FileInfo wordFile in wordFiles Cast as Object for word Open method Object..

How to execute an .SQL script file using c#

http://stackoverflow.com/questions/650098/how-to-execute-an-sql-script-file-using-c-sharp

Initial Catalog ccwebgrity Data Source SURAJIT SQLEXPRESS FileInfo file new FileInfo @ E Project Docs MX462 PD MX756_ModMappings1.sql.. Data Source SURAJIT SQLEXPRESS FileInfo file new FileInfo @ E Project Docs MX462 PD MX756_ModMappings1.sql string script..

Is there a way to check if a file is in use?

http://stackoverflow.com/questions/876473/is-there-a-way-to-check-if-a-file-is-in-use

them all of the time protected virtual bool IsFileLocked FileInfo file FileStream stream null try stream file.Open FileMode.Open..

How to use filegroupdescriptor to drag file to explorer c#

http://stackoverflow.com/questions/1845654/how-to-use-filegroupdescriptor-to-drag-file-to-explorer-c-sharp

private MemoryStream GetFileDescriptor DragFileInfo fileInfo MemoryStream stream new MemoryStream stream.Write BitConverter.GetBytes.. fileDescriptor new FILEDESCRIPTOR fileDescriptor.cFileName fileInfo.FileName Int64 fileWriteTimeUtc fileInfo.WriteTime.ToFileTimeUtc.. fileInfo.FileName Int64 fileWriteTimeUtc fileInfo.WriteTime.ToFileTimeUtc fileDescriptor.ftLastWriteTime.dwHighDateTime..

How can I embed any file type into Microsoft Word using OpenXml 2.0

http://stackoverflow.com/questions/3322247/how-can-i-embed-any-file-type-into-microsoft-word-using-openxml-2-0

string filePathAndName bool displayAsIcon FileInfo fileInfo new FileInfo filePathAndName OpenXmlHelper.AppendEmbeddedObject.. OpenXmlHelper.AppendEmbeddedObject _mainDocumentPart fileInfo displayAsIcon This class in an OpenXml helper class holds all.. Part of your OpenXml Word Doc param param name fileInfo The FileInfo object associated with the file being embedded..

How do I execute a large SQL script (with GO commands) from c#?

http://stackoverflow.com/questions/40814/how-do-i-execute-a-large-sql-script-with-go-commands-from-c

di.GetFiles .sql foreach FileInfo fi in rgFiles FileInfo fileInfo new FileInfo fi.FullName string script fileInfo.OpenText .ReadToEnd.. FileInfo fileInfo new FileInfo fi.FullName string script fileInfo.OpenText .ReadToEnd SqlConnection connection new SqlConnection..

Download/Stream file from URL - asp.net

http://stackoverflow.com/questions/5596747/download-stream-file-from-url-asp-net

DOCUMENT_PATH if File.Exists filePath return var fileInfo new System.IO.FileInfo filePath Response.ContentType application.. filename 0 filePath Response.AddHeader Content Length fileInfo.Length.ToString Response.WriteFile filePath Response.End c#..

Has anyone got any code to call SignerSignEx from C#?

http://stackoverflow.com/questions/6357759/has-anyone-got-any-code-to-call-signersignex-from-c

Marshal.StringToHGlobalUni pathToAssembly var fileInfo new SIGNER_FILE_INFO cbSize uint Marshal.SizeOf typeof SIGNER_FILE_INFO.. typeof SIGNER_FILE_INFO Marshal.StructureToPtr fileInfo info.Union1.pSignerFileInfo false IntPtr pSubjectInfo Marshal.AllocHGlobal..