Hi All, I can't find any code samples where the static protected EscapeString is explained. It's part of the Uri class. class outline: System.Uri: protected static string EscapeString(string str); I need a to make a class where I can use this static methode to convert urls with special characters to a valid uri format with (space = %20) and back (%20 = space). Who can tell me how I can use this class? Thanks. Wernand The Netherlands
Wernand
Posts
-
How to use protected static string EscapeString(string str);??? -
Static variables in methodsyou must define the static as a field, now you get Compiler Error CS1525. Try this: static int c = 0; private void method() { c++; } Regards, Wernand.
-
where can I find the Win32 API constants for C#I have found it on the msdn site from Microsoft. You can simple search in C++ SDK with findstr you get then the values: C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include>findstr "FR_PRIVATE" *.h WinGDI.h:#define FR_PRIVATE 0x10 C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include>findstr "FR_NOT_ENUM" *.h WinGDI.h:#define FR_NOT_ENUM 0x20 :-D
-
where can I find the Win32 API constants for C#Hi All, Excuse me for my bad English. Who can tell me where I can found the constants needed to program win32 api within C#. For example in the Win32 API reference, I found the following procedure:
AddFontResourceEx The AddFontResourceEx function adds the font resource from the specified file to the system. Fonts added with the AddFontResourceEx function can be marked as private and not enumerable. int AddFontResourceEx( LPCTSTR lpszFilename, // font file name DWORD fl, // font characteristics PVOID pdv // reserved );
Where fl stands for Flags used to define how the private font resource is loaded. FR_PRIVATE FR_NOT_ENUM I can find in my books that these constants in C# corresponds with the flags:public const Int32 FR_PRIVATE = 0x10; public const Int32 FR_NOT_ENUM = 0x20;
But now my question. Where can I find the values like 0x10, 0x20 or all the others? I can't find it anywhere, who can help me with this. Thanks and regards, Wernand The Netherlands