S
Scott Johnson
Hi
I am converting some code from C# to VB.NET and I have come across a command
that I can't find the VB equivalent. The C# command is 'lock' and I think
it is used to lock a data type from being used by other threads until it is
released. (?)
Here is the example:
lock(typeof(className))
{
if SkyIsBlue = True
{
//** Do somestuff in here
}
else
{
//** Run For Cover
//** Do somestuff in here
}
}
I tried to use lock, but it was only for locking files for reading/writing
and not the same. Is there an equivalent command in VB.NET or a way to
replicate it?
Thanks!
--Scott
I am converting some code from C# to VB.NET and I have come across a command
that I can't find the VB equivalent. The C# command is 'lock' and I think
it is used to lock a data type from being used by other threads until it is
released. (?)
Here is the example:
lock(typeof(className))
{
if SkyIsBlue = True
{
//** Do somestuff in here
}
else
{
//** Run For Cover
//** Do somestuff in here
}
}
I tried to use lock, but it was only for locking files for reading/writing
and not the same. Is there an equivalent command in VB.NET or a way to
replicate it?
Thanks!
--Scott