Thursday, 22 August 2013

how do i Wait for a string to change from null to some value and them collect it

how do i Wait for a string to change from null to some value and them
collect it

Collect value when it property changes, the method takes some time to get
he string. I have to wait until the string changes from NULL to some
value, after it changes i have to collect it and return. This are two
Different Threads..
public static string k=string.Empty;
public void SomeMethod()
{
k=someObject.Method(byte[]);// this returns some string this methods takes
some time to execute
CollectMethod(k);
}
Public string CollectMethod(string K);
{
return k;// Return only when the k is not null
}

No comments:

Post a Comment