Can i set a global hook on the wind proc in .NET. I am willing to write the
hook procedure in unmanaged dll. I want to capture the window messages of
another application (.NET) from my host application (again .NET).
Thanks in advance
Regards
Arun
===
This list is
Can i set a global hook on the wind proc in .NET. I am willing to write the
hook procedure in unmanaged dll. I want to capture the window messages of
another application (.NET) from my host application (again .NET).
Thanks in advance
Regards
Arun
===
This list is
And what you suggest actually works in well with my suggestion:
Dim X as Object = Nothing
TryParse("", X)
TryParse(Of Object)("", X)
_
function TryParse(byval Input As String, byref Value As Object) As Boolean
WL("Object direct")
return True
end function
function TryParse(Of T)(byval Input
Hum, I don't know how generalized that scenario is, but it sure does
not look clean to me and if I really want to do that, I would use the
more explicit call
TryParse(input, out value)
to make clear my intention. Anyway, I can live with that, I will just
be more careful to watch for yet another t
On 12/04/2008, Sébastien Lorion <[EMAIL PROTECTED]> wrote:
> Well, in my code I have another method similar to:
>
> void DoStuff(Type type, string input)
> {
> object value;
> if (TryParse(input, out value))
> {
>// ...
> }
> }
>
> I made a mistake and forgot to pass "type" to TryParse. I d
make that:
static void DoStuff(Type type, string input)
{
object value;
if (TryParse(input, out value))
{
// ...
}
}
On 4/11/08, Sébastien Lorion <[EMAIL PROTECTED]> wrote:
> Well, in my code I have another method similar to:
>
> void DoStuff(Type type, string input)
> {
> object value
Well, in my code I have another method similar to:
void DoStuff(Type type, string input)
{
object value;
if (TryParse(input, out value)
{
// ...
}
}
I made a mistake and forgot to pass "type" to TryParse. I discovered
the bug only at runtime when testing my code. I can understand the
Sébastien Lorion <[EMAIL PROTECTED]> wrote:
> The following program outputs:
>
> in Parse, type='System.Int32'
This is a run time type object you passed in explicitly.
> in Parse, T='System.Object'
Here, T was inferred at compile time, not run time.
> Is this behavior intended and if yes, why
object value;
Parser.TryParse(typeof(int), "1", out value);
is a valid call to the second (non-generic method).
It would seem to me that it is then inferring T as object here ...
return TryParse(input, out value);
because if
public static bool TryParse(string input, out T value)
The following program outputs:
in Parse, type='System.Int32'
in Parse, T='System.Object'
Is this behavior intended and if yes, why ? I would expect a compile error.
using System;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
object value;
10 matches
Mail list logo