¡@

Home 

c# Programming Glossary: flags

check whether Internet connection is available with C#

http://stackoverflow.com/questions/1085045/check-whether-internet-connection-is-available-with-c-sharp

static void Main string args InternetConnectionState flags 0 bool isConnected InternetGetConnectedState ref flags 0 Console.WriteLine.. flags 0 bool isConnected InternetGetConnectedState ref flags 0 Console.WriteLine isConnected Console.WriteLine flags Console.ReadKey.. flags 0 Console.WriteLine isConnected Console.WriteLine flags Console.ReadKey Additional Info if it helps I access internet..

parse and execute JS by C#

http://stackoverflow.com/questions/4744105/parse-and-execute-js-by-c-sharp

Close PreserveSig int AddNamedItem string name ScriptItem flags PreserveSig int AddTypeLib Guid typeLib uint major uint minor.. int AddTypeLib Guid typeLib uint major uint minor uint flags PreserveSig int GetScriptDispatch string itemName out IntPtr.. exceptionInfo uint flags PreserveSig int Clone out IActiveScript script Guid 4954E0D0..

Anyone know a good workaround for the lack of an enum generic constraint?

http://stackoverflow.com/questions/7244/anyone-know-a-good-workaround-for-the-lack-of-an-enum-generic-constraint

types like this. Anyone know a workaround c# .net enums flags share improve this question EDIT This is now live in version.. although catering for both Int64 based and UInt64 based flags could be the tricky part. I smell some helper methods coming.. methods coming on basically allowing me to treat any flags enum as if it had a base type of UInt64 . What would you want..

What does the [Flags] Enum Attribute mean in C#?

http://stackoverflow.com/questions/8447/what-does-the-flags-enum-attribute-mean-in-c

I changed the answer this one is more in depth. c# enums flags share improve this question The flags attribute should be.. depth. c# enums flags share improve this question The flags attribute should be used whenever the enumerable represents.. be used whenever the enumerable represents a collection of flags rather than a single value. Such collections are usually manipulated..

Most common C# bitwise operations on enums

http://stackoverflow.com/questions/93744/most-common-c-sharp-bitwise-operations-on-enums

So a bit cheat sheet would be nice to have. For example flags flags FlagsEnum.Bit4 Set bit 4. or if flags FlagsEnum.Bit4 FlagsEnum.Bit4.. a bit cheat sheet would be nice to have. For example flags flags FlagsEnum.Bit4 Set bit 4. or if flags FlagsEnum.Bit4 FlagsEnum.Bit4.. For example flags flags FlagsEnum.Bit4 Set bit 4. or if flags FlagsEnum.Bit4 FlagsEnum.Bit4 Is there a less verbose way Can..

check whether Internet connection is available with C#

http://stackoverflow.com/questions/1085045/check-whether-internet-connection-is-available-with-c-sharp

the following method but it is always returning true. Flags enum InternetConnectionState int INTERNET_CONNECTION_MODEM 0x1.. InternetGetConnectedState ref InternetConnectionState lpdwFlags int dwReserved static void Main string args InternetConnectionState..

Win32 API function to programmatically enable/disable device

http://stackoverflow.com/questions/1438371/win32-api-function-to-programmatically-enable-disable-device

using System.Management namespace DisableDevice Flags internal enum SetupDiGetClassDevsFlags Default 1 Present 2.. DisableDevice Flags internal enum SetupDiGetClassDevsFlags Default 1 Present 2 AllClasses 4 Profile 8 DeviceInterface.. Enable 1 Disable 2 PropChange 3 Start 4 Stop 5 Flags internal enum Scopes Global 1 ConfigSpecific 2 ConfigGeneral..

Set global hotkeys using C#

http://stackoverflow.com/questions/2450373/set-global-hotkeys-using-c-sharp

summary The enumeration of possible modifiers. summary Flags public enum ModifierKeys uint Alt 1 Control 2 Shift 4 Win 8..

Changing master volume level

http://stackoverflow.com/questions/294292/changing-master-volume-level

16 const int MIXER_LONG_NAME_CHARS 64 Flags enum MIXERLINE_LINEF uint ACTIVE 0x00000001 DISCONNECTED 0x00008000.. 0x00000001 DISCONNECTED 0x00008000 SOURCE 0x80000000 Flags enum MIXER uint GETLINEINFOF_DESTINATION 0x00000000 GETLINEINFOF_SOURCE.. OBJECTF_HMIDIIN OBJECTF_HANDLE OBJECTF_MIDIIN Flags enum MIXERCONTROL_CT uint CLASS_MASK 0xF0000000 CLASS_CUSTOM..

parse and execute JS by C#

http://stackoverflow.com/questions/4744105/parse-and-execute-js-by-c-sharp

exceptionInfo Flags private enum ScriptText None 0 DelayExecution 1 IsVisible 2.. 2 IsExpression 32 IsPersistent 64 HostManageSource 128 Flags private enum ScriptInfo None 0 IUnknown 1 ITypeInfo 2 Flags.. private enum ScriptInfo None 0 IUnknown 1 ITypeInfo 2 Flags private enum ScriptItem None 0 IsVisible 2 IsSource 4 GlobalMembers..

What does the [Flags] Enum Attribute mean in C#?

http://stackoverflow.com/questions/8447/what-does-the-flags-enum-attribute-mean-in-c

does the Flags Enum Attribute mean in C# Anyone have a good explanation or.. MyColor.Red MyColor.Green MyColor.Blue Note that Flags by itself doesn't change this at all all it does is enable a.. is enable a nice representation by the .ToString method Flags enum SuitsFlags Spades 1 Clubs 2 Diamonds 4 Hearts 8 enum Suits..

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

ipProcessHwnd Win32API.OpenProcess Win32API.ProcessAccessFlags.All false process.Id var objBasic new Win32API.OBJECT_BASIC_INFORMATION.. public static extern IntPtr OpenProcess ProcessAccessFlags dwDesiredAccess MarshalAs UnmanagedType.Bool bool bInheritHandle.. 2 ObjectAllTypesInformation 3 ObjectHandleInformation 4 Flags public enum ProcessAccessFlags uint All 0x001F0FFF Terminate..

Most common C# bitwise operations on enums

http://stackoverflow.com/questions/93744/most-common-c-sharp-bitwise-operations-on-enums

cheat sheet would be nice to have. For example flags flags FlagsEnum.Bit4 Set bit 4. or if flags FlagsEnum.Bit4 FlagsEnum.Bit4.. example flags flags FlagsEnum.Bit4 Set bit 4. or if flags FlagsEnum.Bit4 FlagsEnum.Bit4 Is there a less verbose way Can you.. flags FlagsEnum.Bit4 Set bit 4. or if flags FlagsEnum.Bit4 FlagsEnum.Bit4 Is there a less verbose way Can you give examples of..