G
G Dean Blake
This is some C# code out of a book that is part of a server component using
Application state. I'm trying to convert it to VB. I can't find the VB
equivilent of the Lock. I thought it might be a Mutex but those docs look
different. What is the VB equivelent of the Lock code below?
Thanks,
G
protected override void OnLoad(EventArgs e) {
base.OnLoad(e);
switch (TrackingMode){
case PageTrackingMode.ByApplication:
// Update the page hits in the Application
// object. This operation needs a lock because
// multiple users could access a page at the same
// time.
lock(Page.GetType()){
Page.Application[HitsKey] = Hits + 1;
}
break;
Application state. I'm trying to convert it to VB. I can't find the VB
equivilent of the Lock. I thought it might be a Mutex but those docs look
different. What is the VB equivelent of the Lock code below?
Thanks,
G
protected override void OnLoad(EventArgs e) {
base.OnLoad(e);
switch (TrackingMode){
case PageTrackingMode.ByApplication:
// Update the page hits in the Application
// object. This operation needs a lock because
// multiple users could access a page at the same
// time.
lock(Page.GetType()){
Page.Application[HitsKey] = Hits + 1;
}
break;