How to use mbox in C#?


You can use messagebox.show() method by simply typing mbox and it provides you similar functionality same as that of Messagebox.Show() gives. This article explains on how to use mbox in C# to display a Message Box. I hope it will be useful for all people who are not aware of mbox functionality which is available in winforms.

How to use mbox in C#?

Introduction

What is mbox?


mbox is code snippet provided by .Net framework so that you can use messagebox.show method in your winform applications.

How to use mbox in C#?


You have to just type mbox in your program and press tab twice.
You will find messagebox.show() method is generated in your winform.
You can have various code snipets are available such as ctor , class , cw , Do , Lock.

class YourProgramname
{
static void Main()
{
mbox
}
}


After pressing tab twice , you will get following results:

class YourProgramname
{
static void Main()
{
System.Windows.Forms.MessageBox.Show("Test");
}


Instead of "Test" , you can write your customized message. Shortcuts make intelliSense enable so that it can automatically fill in code snippets in the code editor without using a menu. Valid locations to insert this snippet are as follows:

It can be written inside a particular method, an indexer, a property accessor, or an event accessor.


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: