Click here to Skip to main content
15,905,782 members
Home / Discussions / C#
   

C#

 
AnswerRe: Displaying time of Two Countries?? Pin
Andy Moore19-Jan-06 6:41
Andy Moore19-Jan-06 6:41 
Questionhow create multi Selection reusult Pin
Sasuko19-Jan-06 4:47
Sasuko19-Jan-06 4:47 
AnswerRe: how create multi Selection reusult Pin
Dario Solera19-Jan-06 6:53
Dario Solera19-Jan-06 6:53 
AnswerRe: how create multi Selection reusult Pin
Dave Kreskowiak19-Jan-06 10:23
mveDave Kreskowiak19-Jan-06 10:23 
GeneralRe: how create multi Selection reusult Pin
Sasuko19-Jan-06 13:32
Sasuko19-Jan-06 13:32 
GeneralRe: how create multi Selection reusult Pin
Dave Kreskowiak19-Jan-06 14:53
mveDave Kreskowiak19-Jan-06 14:53 
QuestionSSLStream and Alert Message Pin
elapid19-Jan-06 4:39
elapid19-Jan-06 4:39 
AnswerRe: SSLStream and Alert Message Pin
elapid19-Jan-06 8:28
elapid19-Jan-06 8:28 
GeneralRe: SSLStream and Alert Message Pin
Dave Kreskowiak19-Jan-06 10:05
mveDave Kreskowiak19-Jan-06 10:05 
AnswerRe: SSLStream and Alert Message Pin
Dave Kreskowiak19-Jan-06 10:02
mveDave Kreskowiak19-Jan-06 10:02 
GeneralRe: SSLStream and Alert Message Pin
elapid19-Jan-06 10:50
elapid19-Jan-06 10:50 
GeneralRe: SSLStream and Alert Message Pin
Dave Kreskowiak19-Jan-06 11:54
mveDave Kreskowiak19-Jan-06 11:54 
GeneralRe: SSLStream and Alert Message Pin
elapid19-Jan-06 12:54
elapid19-Jan-06 12:54 
QuestionHow to do media streaming? Pin
Divyang Mithaiwala19-Jan-06 4:13
Divyang Mithaiwala19-Jan-06 4:13 
QuestionFloating point compare Pin
_eulogy_19-Jan-06 3:59
_eulogy_19-Jan-06 3:59 
QuestionFetch variable information over multiple lines with regex Pin
SirErugor19-Jan-06 3:42
SirErugor19-Jan-06 3:42 
QuestionRemove white space from the beginning of a rich text Pin
Agyeman19-Jan-06 3:30
Agyeman19-Jan-06 3:30 
AnswerRe: Remove white space from the beginning of a rich text Pin
CWIZO19-Jan-06 3:39
CWIZO19-Jan-06 3:39 
GeneralRe: Remove white space from the beginning of a rich text Pin
Agyeman19-Jan-06 3:44
Agyeman19-Jan-06 3:44 
AnswerRe: Remove white space from the beginning of a rich text Pin
CWIZO19-Jan-06 3:47
CWIZO19-Jan-06 3:47 
GeneralRe: Remove white space from the beginning of a rich text Pin
Agyeman19-Jan-06 6:01
Agyeman19-Jan-06 6:01 
QuestionLibraries of functions Pin
Roger Jane19-Jan-06 3:27
Roger Jane19-Jan-06 3:27 
Hi All,

This might stem back to 'C' days and I probably ought to change my 'mindset' and other such phrases but old habits die hard. Call me Cliché Man...

When I write an applicaton, I tend to have a source file or two put aside to put all 'those little useful functions' in. You know, generic things like formatting a postal code, validating things etc. that don't fit in with a specific class anywhere. Well, using C#, I've implementing this as follows:

In library.cs:

<br />
namespace mylib {<br />
    public class rog {<br />
        static public int DoSomething(int arg) {<br />
            return arg+1;<br />
        }<br />
    }<br />
}<br />


To call this function, I'm putting this in app1.cs:

<br />
using mylib;<br />
...<br />
    b = rog.DoSomething(3);<br />


This seems like using a class where there is really no need. I'd like to just call 'DoSomething(3)' without the 'rog.' part.

I'm new to C# so be gentle, I'm old to C and C++ so feel free to be harsh.

Am I being stupid?

Thanks for any confirmation or denial...

Rog
AnswerRe: Libraries of functions Pin
CWIZO19-Jan-06 3:42
CWIZO19-Jan-06 3:42 
AnswerRe: Libraries of functions Pin
Werdna19-Jan-06 4:43
Werdna19-Jan-06 4:43 
GeneralRe: Libraries of functions Pin
Roger Jane20-Jan-06 7:14
Roger Jane20-Jan-06 7:14 

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.