473,378 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

#region

Hello!

Below I have manually added the two statement #region Using directives and
#endregion.
I wonder if this possible to have the Visual studio 2005 to generate these
two statement for those statement
that should be included in this section.

#region Using directives

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.IO;

#endregion

//Tony
Aug 8 '08 #1
4 2684
Well, you can select them, right-click, surround-with, #region - but I
suspect it is easier to just type #region ;-p

It wouldn't hugely surprise me if ReSharper can do this - it tends to
have much more refactoring / code [layout] automation features (but I
don't have ReSharper, so I can't check).

Marc
Aug 8 '08 #2
I think there may also be a method to change your default class template
that would statically contain such things. Never had the time to explore it
however.
--wjs

"Tony Johansson" <jo*****************@telia.comwrote in message
news:uq****************@TK2MSFTNGP05.phx.gbl...
Hello!

Below I have manually added the two statement #region Using directives and
#endregion.
I wonder if this possible to have the Visual studio 2005 to generate these
two statement for those statement
that should be included in this section.

#region Using directives

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.IO;

#endregion

//Tony

Aug 8 '08 #3
On Aug 8, 6:16*pm, "Tony Johansson" <johansson.anders...@telia.com>
wrote:
Hello!

Below I have manually added the two statement #region Using directives and
#endregion.
I wonder if this possible to have the Visual studio 2005 to generate these
two statement for those statement
that should be included in this section.

#region Using directives

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.IO;

#endregion
As a workaround, write a macros that does it, and bind it on some
convenient key - so that you can do it for every newly created file
with a single keypress.
Aug 11 '08 #4
I think there may also be a method to change your default class template
that would statically contain such things. Never had the time to explore it
however.
I am using visual studio express 2008 item templates are stored at:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VCSExpress
\ItemTemplatesCache\1033

You can edit these files, restart Visual Studio and then when you add
an item to the project it will default contain the region info.

Project templates are stored separately so you would have to edit all
of the item files within the project template separately.
They are at:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VCSExpress
\ProjectTemplatesCache\1033

NOTE: make shore you back up the directory before editing, you wont
find no undo button there ):

NOTE: VS 2005 the paths will be slightly different. I am shore you can
work them out.

Jay Dee
Aug 11 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Altramagnus | last post by:
I have a complicated Region object, which I need to draw the outline, but not fill How can I convert the Region object to GraphicsPath object? or How can I draw the outline of the Region object?
6
by: Jim | last post by:
Are #region a bad thing or are they good? As far as I see it #region's are a bad thing as they let lazy programmmers have large and bloated methods divided into regions that then appear as small...
4
by: Brian Basquille | last post by:
Hello all, Quick question! How would i keep a point inside a region? For example, the mouse pointer. You should be able to move the mouse around in this region but not anywhere outside it. ...
2
by: Brian Basquille | last post by:
Another question for ye all.. How do i check if a Region has entered another region? Up until now, i've been checking if rectangles (or images converted into Rectangles) have been visible in a...
1
by: Steven T. Hatton | last post by:
All of the following terms are used in some way to describe where and how a name is relevant to a particular location in a program: visible, declarative region, scope, potential scope, valid,...
232
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
1
by: Sagaert Johan | last post by:
i have a control that uses a region to make it non rectangular when i try to to remove the region by calling this.Region.Makeinfinite() the control keeps its non rectangular Region. if i call...
3
by: Grant Edwards | last post by:
I've recently switched from Jed to Emacs for editing python source, and I'm still stumped as to how one indents or dedents a region of code. In Jed it's 'C-c <' or 'C-c >'. Google has found...
1
by: Chris Thomasson | last post by:
This region allocator is not dynamic and can be fed with a buffer residing on the stack of the calling thread. Therefore, you can use this in an environment which does not have a heap; its...
8
by: Chris M. Thomasson | last post by:
Here is the initial crude implmentation which compiles under Comeau with no warnings: ___________________________________________________________________ #include <cassert> #include <cstdlib>...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.