473,399 Members | 3,832 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,399 software developers and data experts.

shortcut

is there any shortcut available that i can use, without typing all the
time Console.Writeline() all the time in C#?

Thanks

Sep 7 '07 #1
7 3391
On Sep 7, 5:32 pm, vinnie <centro.ga...@gmail.comwrote:
is there any shortcut available that i can use, without typing all the
time Console.Writeline() all the time in C#?

Thanks
Create a keyboard macro. Tools->Options

Sep 7 '07 #2
Add this line amongst the other using statements:

using System.Console;

With that in place the compiler will understand that you mean
System.Console.WriteLine when you have WriteLine.
Mark

"vinnie" wrote:
is there any shortcut available that i can use, without typing all the
time Console.Writeline() all the time in C#?

Thanks

Sep 7 '07 #3
code snipper to the rescue
"cw" + tab

http://msdn2.microsoft.com/en-us/lib...at(VS.80).aspx
http://ceiled.spaces.live.com/blog/cns!FDEE70107FF2676B!126.entry

- Rakesh

"vinnie" wrote:
is there any shortcut available that i can use, without typing all the
time Console.Writeline() all the time in C#?

Thanks

Sep 7 '07 #4
Lit
create a private method like this C#

w(string stringToWriteline)
{
System.Console.Writeline(stringToWriteline);
}

then use it like this.

w("this);
w("that");

Lit
"vinnie" <ce**********@gmail.comwrote in message
news:11**********************@50g2000hsm.googlegro ups.com...
is there any shortcut available that i can use, without typing all the
time Console.Writeline() all the time in C#?

Thanks

Sep 7 '07 #5
"Mark_Parker" <Ma********@discussions.microsoft.comwrote in message
news:CC**********************************@microsof t.com...
Add this line amongst the other using statements:

using System.Console;

With that in place the compiler will understand that you mean
System.Console.WriteLine when you have WriteLine.
Mark
I *DARE* you to try this and see if it works.

--
Doug Semler, MCPD
a.a. #705, BAAWA. EAC Guardian of the Horn of the IPU (pbuhh).
The answer is 42; DNRC o-
Gur Hfrarg unf orpbzr fb shyy bs penc gurfr qnlf, abbar rira
erpbtavmrf fvzcyr guvatf yvxr ebg13 nalzber. Fnq, vfa'g vg?

Sep 7 '07 #6
You're right--it didn't work. Care to enlighten me as to why it didn't?

"Doug Semler" wrote:
"Mark_Parker" <Ma********@discussions.microsoft.comwrote in message
news:CC**********************************@microsof t.com...
Add this line amongst the other using statements:

using System.Console;

With that in place the compiler will understand that you mean
System.Console.WriteLine when you have WriteLine.
Mark

I *DARE* you to try this and see if it works.

--
Doug Semler, MCPD
a.a. #705, BAAWA. EAC Guardian of the Horn of the IPU (pbuhh).
The answer is 42; DNRC o-
Gur Hfrarg unf orpbzr fb shyy bs penc gurfr qnlf, abbar rira
erpbtavmrf fvzcyr guvatf yvxr ebg13 nalzber. Fnq, vfa'g vg?

Sep 8 '07 #7
"Mark_Parker" <Ma********@discussions.microsoft.comwrote in message
news:52**********************************@microsof t.com...
You're right--it didn't work. Care to enlighten me as to why it didn't?
I meant to smilie that but I had a bad day...

the "using" statement (in this context) requires a namespace. System is a
namespace. Console is a class in that namespace. What I like about C++ is
it's obvious:
using namepace System;

but in C#, you could say:
using System;

.....

Console.WriteLine(ladeeda);

What Vinnie was asking was trying to avoid the actual typing of the letters
'C' 'o' 'n' 's' 'o' 'l' 'e' '.' 'W' 'r' 'i' 't' 'e' 'L' 'i' 'n' 'e'

In other words, he's just like all other programmers....he's lazy! <BIG
grin>
--
Doug Semler, MCPD
a.a. #705, BAAWA. EAC Guardian of the Horn of the IPU (pbuhh).
The answer is 42; DNRC o-
Gur Hfrarg unf orpbzr fb shyy bs penc gurfr qnlf, abbar rira
erpbtavmrf fvzcyr guvatf yvxr ebg13 nalzber. Fnq, vfa'g vg?

Sep 8 '07 #8

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

Similar topics

27
by: aa | last post by:
Thought this question might be out of this NG's scope, there are always knowledgable people who might hava an answer. A hyperlink to a shortcut to a file returnes an empty screen, and the source...
10
by: Lex | last post by:
I am writing a C# app that has a Menu. Some of the menu items will have short cuts that do not exist in the Shortcut enum. I would like the custom shortcuts to appear on the menu but as far as I...
4
by: Salad | last post by:
A97. If you set a forms properties to ShortcutMenu = No, the entire form is disabled from displaying a shortcut menu. If you set the property to Yes, all controls have a shortcut menu. I have...
5
by: Steven | last post by:
I have some text boxes on a form in MS Access 2000. When I right click in them I don't get any shortcut menu at all. I want the normal cut, copy, and past menu to come up. In the "Startup", I...
0
by: cefrancke | last post by:
I recently discovered, that if you set the startup options for "security", you will have alot of work do to get Access back to "normal". If you disable the built-in menus/toolbars you'll have to...
0
by: Marcel | last post by:
Hi, the application I am writing has a MainMenu and a DataGrid (UltraGrid). Now I have to edit the text of each cell in this grid. So far so good. All works fine in editmode but if I press a...
4
by: I_AM_DON_AND_YOU? | last post by:
There is one more problem I am facing but didn't get the solution. In my Setup Program I am not been able to create 2 things (when the program is intalled on the client machine ) : (1) create...
3
by: TC | last post by:
I've written an application using VB.NET 2003 and packaged it with a deployment project. When I use the setup program to install the application, however, it doesn't work. More specifically, the...
7
by: GrandpaB | last post by:
I would appreciate assistance learning how to create a Desktop shortcut in my setup project. In the left pane of the Setup/File System window I right-clicked User's Desktop. From the contex...
5
by: remya1000 | last post by:
i'm using VB.NET 2003 application program. by using OpenFileDialog, we can select the file name or file path. OpenFileDialog1.ShowDialog() pgmPath.Text =...
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: 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
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.