¡@

Home 

c# Programming Glossary: fi

Upload file on ftp

http://stackoverflow.com/questions/10151680/upload-file-on-ftp

file on ftp I want to upload file from one server to another ftp.. file on ftp I want to upload file from one server to another ftp server and following is my.. to another ftp server and following is my code to upload file but it is throwing an error as The remote server returned..

C# Using Reflection to copy base class properties

http://stackoverflow.com/questions/1198886/c-sharp-using-reflection-to-copy-base-class-properties

BindingFlags.Instance foreach FieldInfo fi in myObjectFields fi.SetValue copyObject fi.GetValue o I was.. foreach FieldInfo fi in myObjectFields fi.SetValue copyObject fi.GetValue o I was looking to see if there.. FieldInfo fi in myObjectFields fi.SetValue copyObject fi.GetValue o I was looking to see if there were any more BindingFlags..

Accessing internal members via System.Reflection?

http://stackoverflow.com/questions/171332/accessing-internal-members-via-system-reflection

small related projects. What I have so far is FieldInfo _fields typeof ButtonedForm.TitleButton .GetFields BindingFlags.NonPublic.. BindingFlags.DeclaredOnly Console.WriteLine 0 fields _fields.Length foreach FieldInfo fi in _fields Console.WriteLine.. BindingFlags.DeclaredOnly Console.WriteLine 0 fields _fields.Length foreach FieldInfo fi in _fields Console.WriteLine..

Anyone know a quick way to get to custom attributes on an enum value?

http://stackoverflow.com/questions/17772/anyone-know-a-quick-way-to-get-to-custom-attributes-on-an-enum-value

a string the .ToString on enums is very slow FieldInfo fi typeOfEnum.GetField enumInput.ToString get the attribute from.. enumInput.ToString get the attribute from the field return fi.GetCustomAttributes typeof CustomInfoAttribute.. enumInput.ToString get the attribute from the field return fi.GetCustomAttributes typeof CustomInfoAttribute false . FirstOrDefault..

Access the value of a member expression

http://stackoverflow.com/questions/2616638/access-the-value-of-a-member-expression

MemberExpression GetRootConstantExpression m var fi PropertyInfo memberExpression.Member var val fi.GetValue ConstantExpression.. m var fi PropertyInfo memberExpression.Member var val fi.GetValue ConstantExpression memberExpression.Expression .Value..

How to get C# Enum description from value? [duplicate]

http://stackoverflow.com/questions/2650080/how-to-get-c-sharp-enum-description-from-value

static string GetEnumDescription Enum value FieldInfo fi value.GetType .GetField value.ToString DescriptionAttribute.. DescriptionAttribute attributes DescriptionAttribute fi.GetCustomAttributes typeof DescriptionAttribute false if attributes..

Get enum from enum attribute

http://stackoverflow.com/questions/2787506/get-enum-from-enum-attribute

Als foreach Enum val in Enum.GetValues enumType FieldInfo fi enumType.GetField val.ToString StringValueAttribute attributes.. StringValueAttribute attributes StringValueAttribute fi.GetCustomAttributes typeof StringValueAttribute false StringValueAttribute..

LINQ Contains Case Insensitive

http://stackoverflow.com/questions/3360772/linq-contains-case-insensitive

description return this.ObjectContext.FACILITY_ITEM.Where fi fi.DESCRIPTION.Contains description c# linq share improve.. return this.ObjectContext.FACILITY_ITEM.Where fi fi.DESCRIPTION.Contains description c# linq share improve this.. description c# linq share improve this question fi fi.DESCRIPTION.toLower .Contains description.ToLower share..

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

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

C# String enums

http://stackoverflow.com/questions/424366/c-sharp-string-enums

value string output null Type type value.GetType Check first in our cached results... Look for our 'StringValueAttribute'.. results... Look for our 'StringValueAttribute' in the field's custom attributes FieldInfo fi type.GetField value.ToString.. in the field's custom attributes FieldInfo fi type.GetField value.ToString StringValue attrs fi.GetCustomAttributes..

MVC3 Razor DropDownListFor Enums

http://stackoverflow.com/questions/4656758/mvc3-razor-dropdownlistfor-enums

to get my project updated to MVC3 something I just can't find I have a simple datatype of ENUMS public enum States AL AK.. AJAX JSON POST Method. And than the view div class editor field @Html.DropDownListFor model model.State model model.States.. foreach var item in Enum.GetValues enumType FieldInfo fi enumType.GetField item.ToString var attribute fi.GetCustomAttributes..

Resolve assembly references from another folder

http://stackoverflow.com/questions/5260404/resolve-assembly-references-from-another-folder

the whole server application is not installed but this is fine. On the server where I want to copy this custom application.. those assemblies. I know I can use probing in app.config to specify in which folders my exe has to look for references.. on application start or execution. Thanks. Edit here the final working code static System.Reflection.Assembly currentDomain_AssemblyResolve..

What is the best way to recursively copy contents in C#?

http://stackoverflow.com/questions/627504/what-is-the-best-way-to-recursively-copy-contents-in-c

Directory.CreateDirectory target.FullName copy all the files into the new directory foreach FileInfo fi in source.GetFiles.. all the files into the new directory foreach FileInfo fi in source.GetFiles fi.CopyTo Path.Combine target.ToString.. new directory foreach FileInfo fi in source.GetFiles fi.CopyTo Path.Combine target.ToString fi.Name true copy all..

C#: Accessing Inherited Private Instance Members Through Reflection

http://stackoverflow.com/questions/686482/c-accessing-inherited-private-instance-members-through-reflection

in C#. I want to use reflection to access all of private fields in a class including those which are inherited. I have succeeded.. are inherited. I have succeeded in accessing all private fields excluding those which are inherited as well as all of the.. as well as all of the public and protected inherited fields. However I have not been able to access the private inherited..

Performance issue: comparing to String.Format

http://stackoverflow.com/questions/761121/performance-issue-comparing-to-string-format

to exactly match the String.Format behavior. This week I finally did it. I actually went through using the .Net framework.. format to use with supplied argument ie 0 X for Hex for fixed width format examples below public int width 0 7 means it.. args var sb new StringBuilder baseSize foreach FormatItem fi in parts if fi.index 0 sb.Append fi.value else if fi.index..

Accessing the fields of a struct

http://stackoverflow.com/questions/997747/accessing-the-fields-of-a-struct

the fields of a struct Why does the following code produce no output.. produce no output static void Main string args FieldInfo fi typeof MyStruct .GetFields BindingFlags.Public foreach FieldInfo.. .GetFields BindingFlags.Public foreach FieldInfo info in fi Console.WriteLine info.Name public struct MyStruct public int..

How to enumerate the LOCALIZED alphabet in C#?

http://stackoverflow.com/questions/5676692/how-to-enumerate-the-localized-alphabet-in-c

'' Create and init our structure that will get passed Dim FI As New LOCALESIGNATURE FI.Initialize '' Determine the size of.. that will get passed Dim FI As New LOCALESIGNATURE FI.Initialize '' Determine the size of our structure Dim SI Marshal.SizeOf.. Determine the size of our structure Dim SI Marshal.SizeOf FI '' Call the unmanaged function Dim Result As Integer GetLocaleInfoW..

How to restore files from recycle bin [duplicate]

http://stackoverflow.com/questions/6025311/how-to-restore-files-from-recycle-bin

10 for int i 0 i Recycler.Items .Count i FolderItem FI Recycler.Items .Item i string FileName Recycler.GetDetailsOf.. .Item i string FileName Recycler.GetDetailsOf FI 0 if Path.GetExtension FileName FileName Path.GetExtension FI.Path.. 0 if Path.GetExtension FileName FileName Path.GetExtension FI.Path Necessary for systems with hidden file extensions. string..