¡@

Home 

c# Programming Glossary: file

Looking for C# HTML parser [duplicate]

http://stackoverflow.com/questions/100358/looking-for-c-sharp-html-parser

I'm looking for a library method to parse an html file with more html specific features than generic xml parsing libraries...

Should Usings be inside or outside the namespace

http://stackoverflow.com/questions/125319/should-usings-be-inside-or-outside-the-namespace

double d Math.PI Now imagine that someone adds another file File2.cs to the project that looks like this File2.cs namespace..

How do you do a deep copy an object in .Net (C# specifically)?

http://stackoverflow.com/questions/129389/how-do-you-do-a-deep-copy-an-object-in-net-c-specifically

as Serializable in order for this to work. Your source file must include the following code using System.Runtime.Serialization.Formatters.Binary..

Create Excel (.XLS and .XLSX) file from C# [closed]

http://stackoverflow.com/questions/151005/create-excel-xls-and-xlsx-file-from-c-sharp

Excel .XLS and .XLSX file from C# closed How can I create an Excel Spreadsheet with C#.. I would like to avoid using Excel directly to create the file using OLE Automation. The .CSV file solution is easy and is.. directly to create the file using OLE Automation. The .CSV file solution is easy and is the current way I am handling this but..

Use of Application.DoEvents()

http://stackoverflow.com/questions/5181777/use-of-application-doevents

Is it possible to dynamically compile and execute C# code fragments?

http://stackoverflow.com/questions/826398/is-it-possible-to-dynamically-compile-and-execute-c-sharp-code-fragments

if it is possible to save C# code fragments to a text file or any input stream and then execute those dynamically Assuming..

How to use HTML Agility pack

http://stackoverflow.com/questions/846994/how-to-use-html-agility-pack

options set as needed htmlDoc.OptionFixNestedTags true filePath is a path to a file containing the html htmlDoc.Load filePath.. htmlDoc.OptionFixNestedTags true filePath is a path to a file containing the html htmlDoc.Load filePath Use htmlDoc.LoadHtml.. is a path to a file containing the html htmlDoc.Load filePath Use htmlDoc.LoadHtml xmlString to load from a string was..

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

there a way to check if a file is in use I'm writing a program in C# that needs to repeatedly.. a program in C# that needs to repeatedly access 1 image file. Most of the time it works but if my computer's running fast.. if my computer's running fast it will try to access the file before it's been saved back to the filesystem and throw an error..

How can a Word document be created in C#? [closed]

http://stackoverflow.com/questions/10412/how-can-a-word-document-be-created-in-c

default.aspx Introducing the Office 2007 Open XML File Formats http msdn.microsoft.com en us library aa338205.aspx..

Get http:/…/File Size

http://stackoverflow.com/questions/122853/get-http-file-size

http &hellip File Size I want to get the size of an http ... file before I download..

C# Reading a File Line By Line

http://stackoverflow.com/questions/1271225/c-sharp-reading-a-file-line-by-line

Reading a File Line By Line I am trying to read some text files where each.. your time First example open file using var file System.IO.File.OpenText _LstFilename read file while file.EndOfStream String.. open file using var file System.IO.File.OpenText _LstFilename read file while file.EndOfStream String line file.ReadLine..

CSV File Imports in .Net [closed]

http://stackoverflow.com/questions/1898/csv-file-imports-in-net

File Imports in .Net closed I realize this is a newbie question..

Multipart forms from C# client

http://stackoverflow.com/questions/219827/multipart-forms-from-c-sharp-client

hopefully it should give the basics. It only supports File data and form data at the moment. public class PostData private.. sb.AppendLine boundary if p.Type PostDataParamType.File sb.AppendLine string.Format Content Disposition file name 0.. Content Disposition file name 0 filename 1 p.Name p.FileName sb.AppendLine Content Type text plain sb.AppendLine sb.AppendLine..

how can you easily check if access is denied for a file in .NET?

http://stackoverflow.com/questions/265953/how-can-you-easily-check-if-access-is-denied-for-a-file-in-net

time I've done it I was wrong to even make the attempt. File permissions even file existence are volatile &mdash they can..

How to force my .NET App to run as administrator on Windows 7?

http://stackoverflow.com/questions/2818179/how-to-force-my-net-app-to-run-as-administrator-on-windows-7

higher Project Add New Item select Application Manifest File . Change the requestedExecutionLevel element to requestedExecutionLevel..

How to apply an XSLT Stylesheet in C#

http://stackoverflow.com/questions/34093/how-to-apply-an-xslt-stylesheet-in-c-sharp

to an XML Document using C# and write the output to a File. c# xml xslt share improve this question I found a possible.. article XPathDocument myXPathDoc new XPathDocument myXmlFile XslTransform myXslTrans new XslTransform myXslTrans.Load myStyleSheet.. instead XPathDocument myXPathDoc new XPathDocument myXmlFile XslCompiledTransform myXslTrans new XslCompiledTransform myXslTrans.Load..

How to read a text file reversely with iterator in C#

http://stackoverflow.com/questions/452902/how-to-read-a-text-file-reversely-with-iterator-in-c-sharp

to decode the file into text. summary param name filename File to read from param public ReverseLineReader string filename.. the enumerator is fetched. summary param name filename File to read from param param name encoding Encoding to use to decode.. ReverseLineReader string filename Encoding encoding this File.OpenRead filename encoding summary Creates a LineReader from..

Get File Icon used by Shell

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

File Icon used by Shell In .Net C# or VB don't care given a file.. In .Net C# or VB don't care given a file path string FileInfo struct or FileSystemInfo struct for a real existing file.. VB don't care given a file path string FileInfo struct or FileSystemInfo struct for a real existing file how can I determine..

File Upload ASP.NET MVC 3.0

http://stackoverflow.com/questions/5193842/file-upload-asp-net-mvc-3-0

Upload ASP.NET MVC 3.0 I want to upload file in asp.net mvc.. the upload HttpPost public ActionResult Index HttpPostedFileBase file Verify that the user selected a file if file null.. 0 extract only the fielname var fileName Path.GetFileName file.FileName store the file inside ~ App_Data uploads..

How do I get the path of the assembly the code is in?

http://stackoverflow.com/questions/52797/how-do-i-get-the-path-of-the-assembly-the-code-is-in

MbUnit Gui Environment.CurrentDirectory gives c Program Files MbUnit System.Reflection.Assembly.GetAssembly typeof DaoTests.. in URI format then UriBuild.UnescapeDataString removes the File at the beginning and GetDirectoryName changes it to the normal..

Executing Batch File in C#

http://stackoverflow.com/questions/5519328/executing-batch-file-in-c-sharp

Batch File in C# I'm trying to execute a batch file in C# but i'm not..

Accessing a Shared File (UNC) From a Remote, Non-Trusted Domain With Credentials

http://stackoverflow.com/questions/659013/accessing-a-shared-file-unc-from-a-remote-non-trusted-domain-with-credentials

a Shared File UNC From a Remote Non Trusted Domain With Credentials We've..

Is there a faster way to scan through a directory recursively in .NET?

http://stackoverflow.com/questions/724148/is-there-a-faster-way-to-scan-through-a-directory-recursively-in-net

.NET I am writing a directory scanner in .NET. For each File Dir I need the following info. class Info public bool IsDirectory.. dir.FullName foreach var file in dirInfo.GetFiles info.Add new Info IsDirectory false CreatedDate file.CreationTimeUtc.. this up I'm thinking of hand coding this with FindFirstFileW but would like to avoid that if there is a built in way that..

Using C#, how does one figure out what process locked a file?

http://stackoverflow.com/questions/860656/using-c-how-does-one-figure-out-what-process-locked-a-file

using System.Text using System.Threading namespace FileLockInfo public class Win32Processes summary Return a list of.. summary public static List Process GetProcessesLockingFile string filePath var procs new List Process var processListSnapshot.. if process.Id 4 continue system processes var files GetFilesLockedBy process if files.Contains filePath procs.Add process..

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

it's been saved back to the filesystem and throw an error File in use by another process . I would like to find a way around.. can't avoid them all of the time protected virtual bool IsFileLocked FileInfo file FileStream stream null try stream file.Open.. them all of the time protected virtual bool IsFileLocked FileInfo file FileStream stream null try stream file.Open FileMode.Open..

Seeking clarification on apparent contradictions regarding weakly typed languages

http://stackoverflow.com/questions/9929585/seeking-clarification-on-apparent-contradictions-regarding-weakly-typed-language

if you try to Python 1 1 Traceback most recent call last File line 1 in TypeError unsupported operand type s for 'int' and..

Getting / setting file owner in C#

http://stackoverflow.com/questions/153087/getting-setting-file-owner-in-c-sharp

simple though it's a bit of a cumbersome API const string FILE @ C test.txt var fs File.GetAccessControl FILE var sid fs.GetOwner.. string FILE @ C test.txt var fs File.GetAccessControl FILE var sid fs.GetOwner typeof SecurityIdentifier Console.WriteLine.. username fs.SetOWner ntAccount try File.SetAccessControl FILE fs catch InvalidOperationException ex Console.WriteLine You..

Exclusive access could not be obtained because the database is in use

http://stackoverflow.com/questions/4046708/exclusive-access-could-not-be-obtained-because-the-database-is-in-use

DATABASE DatabaseFullPath FROM DISK N' backUpPath ' WITH FILE 1 NOUNLOAD STATS 10 using SqlConnection con new SqlConnection..

How to find if a native DLL file is compiled as x64 or x86?

http://stackoverflow.com/questions/480696/how-to-find-if-a-native-dll-file-is-compiled-as-x64-or-x86

Dump of file cv210.dll PE signature found File Type DLL FILE HEADER VALUES 8664 machine x64 6 number of sections 4BBAB813.. Dump of file acrdlg.dll PE signature found File Type DLL FILE HEADER VALUES 14C machine x86 5 number of sections 467AFDD2..

How to retrieve certificates from a pfx file with c#?

http://stackoverflow.com/questions/5036590/how-to-retrieve-certificates-from-a-pfx-file-with-c

some C# example code string certPath YOUR PFX FILE PATH string certPass YOUR PASSWORD Create a collection object..

In .NET 4.0, how do I 'sandbox' an in-memory assembly and execute a method?

http://stackoverflow.com/questions/5997995/in-net-4-0-how-do-i-sandbox-an-in-memory-assembly-and-execute-a-method

an AppDomain and load an assembly THAT IS NOT ON THE FILE SYSTEM but rather in RAM. Again the reasons why the other solutions..

Print the source filename and linenumber in C#

http://stackoverflow.com/questions/6369184/print-the-source-filename-and-linenumber-in-c-sharp

and print that value in the console output Like LINE and FILE in C Please advise. Many thanks c# share improve this question..

C# AssemblyFileVersion usage within a program

http://stackoverflow.com/questions/699580/c-sharp-assemblyfileversion-usage-within-a-program

on a program and I'm trying to display the assembly FILE version public static string Version get Assembly asm Assembly.GetExecutingAssembly..

Writing large number of records (bulk insert) to Access in .NET/C#

http://stackoverflow.com/questions/7070011/writing-large-number-of-records-bulk-insert-to-access-in-net-c

Microsoft.Office.Interop.Access USED ONLY FOR THE TEXT FILE METHOD using DAO Microsoft.Office.Interop.Access.Dao USED ONLY..

FileInfo Exceptions

http://stackoverflow.com/questions/7184472/fileinfo-exceptions

HERE IS MY OUTPUT WHENEVER I HAVE CREATED A NEW FILE OnCreate Could not find file 'C Users admin Desktop dirtbag.txt'...

How to create a bmp file from byte[] in C#

http://stackoverflow.com/questions/742236/how-to-create-a-bmp-file-from-byte-in-c-sharp

char filename int width int height unsigned char imageData FILE filePtr file pointer BITMAPFILEHEADER bitmapFileHeader bitmap.. unsigned char imageData FILE filePtr file pointer BITMAPFILEHEADER bitmapFileHeader bitmap file header BITMAPINFOHEADER bitmapInfoHeader.. bitmap file header bitmapFileHeader.bfSize sizeof BITMAPFILEHEADER bitmapFileHeader.bfType 0x4D42 bitmapFileHeader.bfReserved1..

access to full resolution pictures from camera with MonoDroid

http://stackoverflow.com/questions/8068156/access-to-full-resolution-pictures-from-camera-with-monodroid

Java.IO.File path if xfile.Exists Android.Util.Log.Warn FILE file exists 0 n overwriting xfile.Name xfile.Delete xfile.CreateNewFile.. xfile.CreateNewFile else Android.Util.Log.Warn FILE file does not exist 0 creating xfile.Name xfile.Mkdirs xfile.CreateNewFile.. xfile Android.Util.Log.WriteLine LogPriority.Warn FILE fileUri.ToString intent.PutExtra Android.Provider.MediaStore.ExtraOutput..

How to prevent System.Xml.XmlException: Invalid character in the given encoding

http://stackoverflow.com/questions/8275825/how-to-prevent-system-xml-xmlexception-invalid-character-in-the-given-encoding

DOCUMENT select new DocMetaData File d.Element FILE .SafeGetAttributeValue filename Folder d.Element FOLDER .SafeGetAttributeValue.. there are many xml version 1.0 DOCUMENTCOLLECTION DOCUMENT FILE filename e S2Out B0000005 General D003712420.0001.pdf outputpath.. FOLDER name Accreditation PASBVE 2004 06 DOCUMENT DOCUMENT FILE filename e S2Out B0000005 General D003712442.0001.pdf outputpath..