TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Check Roles instance running in Emulator?
Dhananjay Kumar
Oct 12, 2011
3.9
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
Learn here how to check Roles instance running in Emulator.
In Build Windows Azure SDK 1.5 got announced. Windows Azure SDK 1.5 allows us to check whether Roles are running in emulator or not?
Static method IsEmulated returns Boolean value after checking whether Role instance is running in emulator or not.
Signature of IsEmulated is as below and it is part of the class RoleEnvironment
You can check running instance is in emulator or not as below,
bool
isRunningInEmulator =
RoleEnvironment
.IsEmulated;
if
(isRunningInEmulator)
Label1.Text =
"Running in Emulator"
;
else
Label1.Text =
"Hey you are on Cloud"
;
I hope this post was useful. Thanks for reading
Next Recommended Reading
Count Instances Of The Class Using C#