Archive

Posts Tagged ‘Declare’

Code Issues – Undeclared element

October 18th, 2012 Comments off

Cause:

Highlights identifier references to local variables, fields, method, properties, classes, structures, interfaces and everything that is not yet declared.

Read more…

MVC-specific CodeRush code declaration providers

September 21st, 2012 Comments off

There are three code generation providers specific to MVC. They allow you to declare MVC controllers, MVC actions and MVC views correspondingly:

  • Declare Controller
  • Declare Action
  • Declare View

Read more…

Declaring events and event handlers using CodeRush

September 21st, 2012 Comments off

With the help of CodeRush we can declare everything starting from undeclared local variables and members to undeclared objects like classes and structures. Here, we will take a look at the code declaration providers for declaring events and event handlers:

  • Declare Event
  • Declare Event Handler

Read more…

Declaring methods and constructors using CodeRush

September 21st, 2012 Comments off

When writing a new code, it usually implies writing a not-declared code like a method invocation, property calls, etc. To help you quickly create the required declarations, there are a lot of code generation providers for declaring methods, properties, fields, locals and everything else. Let’s review the method and constructor code declaration providers:

  • Declare Constructor
  • Declare Method
  • Declare Method (abstract)

Read more…

Code Issues specific for declaring variables and constants

August 9th, 2012 Comments off

In addition to code issues specific for declaring types, CSharp and Visual Basic language specifications have a few restrictions on declaring constant or simple variable declarations. Having this issue in the code editor right in front of a developer allows him to fix the issue immediately without compiling the project.

Read more…

Quick ways to add and remove a set/get property accessor with CodeRush

August 9th, 2012 Comments off

A property without a ‘set’ accessor is considered read-only:

CodeRush Add Setter code sample

Read more…

Declaring locals using CodeRush consume-first declaration features

December 16th, 2011 Comments off

Local variable declarations are the most often used types of declarations in code. A local variable is a type of variable declared by local variable declaration inside a block the variable is intended to be local to. The local variable declaration explicitly defines the type of the variable that has been declared along with the identifier that names the variable. You can also declare implicitly typed local variables, whose type is inferred by the compiler from the expression.

Read more…

Declaring various properties using CodeRush code generation tools

August 18th, 2011 Comments off

The consume-first declaration features of CodeRush are a quick way to generate the required code without typing the entire declaration’s code by hand. Once you have a reference to an undeclared member, pressing the CodeRush key allows you to choose a member you would like to declare. Let’s take a look at the property-declaring code generation providers you can use.

Read more…