Click here to Skip to main content
15,921,028 members
Home / Discussions / C#
   

C#

 
GeneralRe: Tabcontrol Pin
Luis Alonso Ramos27-Jun-05 5:17
Luis Alonso Ramos27-Jun-05 5:17 
GeneralClass Generator Pin
Leyu24-Jun-05 6:22
Leyu24-Jun-05 6:22 
GeneralRe: Class Generator Pin
Steve Maier24-Jun-05 8:40
professionalSteve Maier24-Jun-05 8:40 
GeneralRe: Class Generator Pin
ChesterPoindexter24-Jun-05 13:36
professionalChesterPoindexter24-Jun-05 13:36 
Generalassignment to controls ( Label) Pin
pbsamson24-Jun-05 5:49
pbsamson24-Jun-05 5:49 
GeneralRe: assignment to controls ( Label) Pin
Marc Clifton24-Jun-05 6:20
mvaMarc Clifton24-Jun-05 6:20 
GeneralRe: assignment to controls ( Label) Pin
pbsamson24-Jun-05 6:27
pbsamson24-Jun-05 6:27 
GeneralLine Width Pin
Leslie Sanford24-Jun-05 5:43
Leslie Sanford24-Jun-05 5:43 
I was wondering if you as a C# programmer try to keep the line width of your code under a certain number of characters.

Back in my C days, I tried to keep all lines of code within 72 characters. This wasn't hard to do. But I'm finding it impossible with C#. For one thing the .NET coding guidelines discourage abreviated names for classes, methods, events, etc. (which I understand and agree with). But more importantly, with namespaces, classes, methods, and so on, I find myself indenting further and further before I even get to the meat of the code. And it's even worse if you're trying to make the class thread safe using the lock mechanism.

To show you what I mean...

namespace SomeNamespace
{
    private readonly object lockObject = new Object();

    public class SomeClass
    {
        public void SomeMethod()
        {
            lock(lockObject)
            {
                // Finally I get to do something!
            }
        }
    }
}


I find it imposible in many cases to keep the code within a certain line width. I'm not complaining; I appreciate all of these constructs that make programming easier to manage and reason about. But I was just wondering what other C# programmers think about line width. What approaches do you take? Or do you just not worry about it?
GeneralRe: Line Width Pin
Judah Gabriel Himango24-Jun-05 5:56
sponsorJudah Gabriel Himango24-Jun-05 5:56 
QuestionHow to use windows ping utility in C#? Pin
Mohamed El Gohary24-Jun-05 5:39
Mohamed El Gohary24-Jun-05 5:39 
AnswerRe: How to use windows ping utility in C#? Pin
Judah Gabriel Himango24-Jun-05 5:52
sponsorJudah Gabriel Himango24-Jun-05 5:52 
AnswerRe: How to use windows ping utility in C#? Pin
Mike Dimmick24-Jun-05 6:08
Mike Dimmick24-Jun-05 6:08 
Generalsearch ip address Pin
amarsumanth24-Jun-05 5:36
amarsumanth24-Jun-05 5:36 
GeneralRe: search ip address Pin
Judah Gabriel Himango24-Jun-05 5:50
sponsorJudah Gabriel Himango24-Jun-05 5:50 
GeneralRe: search ip address Pin
amarsumanth24-Jun-05 7:41
amarsumanth24-Jun-05 7:41 
GeneralRe: search ip address Pin
Dave Kreskowiak24-Jun-05 8:06
mveDave Kreskowiak24-Jun-05 8:06 
Generalping Pin
amarsumanth24-Jun-05 8:55
amarsumanth24-Jun-05 8:55 
GeneralRe: ping Pin
Dave Kreskowiak24-Jun-05 9:32
mveDave Kreskowiak24-Jun-05 9:32 
GeneralNaN Pin
hain24-Jun-05 5:23
hain24-Jun-05 5:23 
GeneralRe: NaN Pin
Richard Deeming24-Jun-05 8:04
mveRichard Deeming24-Jun-05 8:04 
Generaladmin password Pin
amarsumanth24-Jun-05 5:10
amarsumanth24-Jun-05 5:10 
GeneralRe: admin password Pin
Judah Gabriel Himango24-Jun-05 5:13
sponsorJudah Gabriel Himango24-Jun-05 5:13 
GeneralRe: admin password Pin
Dave Kreskowiak24-Jun-05 8:04
mveDave Kreskowiak24-Jun-05 8:04 
QuestionPocket PC virtual keyboard? Pin
george ivanov24-Jun-05 4:33
george ivanov24-Jun-05 4:33 
AnswerRe: Pocket PC virtual keyboard? Pin
Mike Dimmick24-Jun-05 5:52
Mike Dimmick24-Jun-05 5:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.