Each of us has our own unique flaw…
You’ve just got to take each person for what they are and look for the good in them
But it’s the cracks and flaws we each have that make our lives together so very interesting and rewarding.
Wednesday, August 27, 2008
Flowers
Each of us has our own unique flaw…
You’ve just got to take each person for what they are and look for the good in them
But it’s the cracks and flaws we each have that make our lives together so very interesting and rewarding.
You’ve just got to take each person for what they are and look for the good in them
But it’s the cracks and flaws we each have that make our lives together so very interesting and rewarding.
Tuesday, August 26, 2008
Extern?
The extern modifier is used to declare a method that is implemented externally. A common use of the extern modifier is with the DllImport attribute when you are using Interop services to call into unmanaged code. In this case, the method must also be declared as static, as shown in the following example
A common use of it is for the Windows API. I have a class that containsdeclarations like this:
internal static class API{[DllImport("user32.dll")]internal static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, UIntPtrwParam, IntPtr lParam);}
whereas using the abstract modifier means that the method implementation is not provided in the class.
A common use of it is for the Windows API. I have a class that containsdeclarations like this:
internal static class API{[DllImport("user32.dll")]internal static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, UIntPtrwParam, IntPtr lParam);}
whereas using the abstract modifier means that the method implementation is not provided in the class.
Sentence with All alphabet.
Sentence with All alphabet.
- "The quick brown fox jumps over the lazy dog".
Replacing path seperator string with anothercharacter.
Replacing path seperator string with anothercharacter.
Code snippet:-
string Path =@ "-\\XXX\\YYY\\ZZZ\\File.txt";
string NewPath = Path.Replace("\\file:///");
Now the NewPath will be "//XXX/YYY/ZZZ/File.txt"
Code snippet:-
string Path =@ "-\\XXX\\YYY\\ZZZ\\File.txt";
string NewPath = Path.Replace("\\file:///");
Now the NewPath will be "//XXX/YYY/ZZZ/File.txt"
Subscribe to:
Comments (Atom)