Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

c# - make all vars explicit typed at once

The var keyword in c# is a great time saver while your coding, but when you are looking back at code that's not fresh in your mind, it's more helpful to have explicit types in the code.

I have code rush express which allows me to "Make Explicit" 1 var keyword at a time.

Are there any tools or add ins that will convert many of them at once?

like image 820
Ronnie Overby Avatar asked Sep 17 '11 15:09

Ronnie Overby


People also ask

What C is used for?

C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...

What is C in C language?

What is C? C is a general-purpose programming language created by Dennis Ritchie at the Bell Laboratories in 1972. It is a very popular language, despite being old. C is strongly associated with UNIX, as it was developed to write the UNIX operating system.

What is the full name of C?

In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr.

Is C language easy?

Compared to other languages—like Java, PHP, or C#—C is a relatively simple language to learn for anyone just starting to learn computer programming because of its limited number of keywords.


2 Answers

Yes Resharper can do this using the code clean up macros. Whether you want to enforce explicit or implicit types is a setting.

like image 192
TheCodeKing Avatar answered Oct 01 '22 07:10

TheCodeKing


Coderush is based on an open framework or api freely available on DX website. Not sure now but i think is called DxCore. you can download it and play with that to make your own extension for CodeRush. I would not do it anyway, there is really nothing wrong in the usage of var unless some very specific cases when it is really not obvious to understand what it will contain.

like image 27
Davide Piras Avatar answered Oct 01 '22 09:10

Davide Piras