Click here to Skip to main content
16,018,419 members
Home / Discussions / C#
   

C#

 
GeneralRe: Why I hate C# Pin
Christian Graus28-Nov-07 15:14
protectorChristian Graus28-Nov-07 15:14 
GeneralRe: Why I hate C# Pin
Luc Pattyn28-Nov-07 22:35
sitebuilderLuc Pattyn28-Nov-07 22:35 
GeneralRe: Why I hate C# Pin
Skippums29-Nov-07 4:18
Skippums29-Nov-07 4:18 
GeneralRe: Why I hate C# Pin
Paul Conrad28-Nov-07 14:32
professionalPaul Conrad28-Nov-07 14:32 
GeneralRe: Why I hate C# Pin
PIEBALDconsult28-Nov-07 14:59
mvePIEBALDconsult28-Nov-07 14:59 
GeneralRe: Why I hate C# Pin
Alaric_29-Nov-07 7:26
professionalAlaric_29-Nov-07 7:26 
GeneralRe: Why I hate C# Pin
Judah Gabriel Himango28-Nov-07 15:27
sponsorJudah Gabriel Himango28-Nov-07 15:27 
AnswerRe: Why I hate C# Pin
PIEBALDconsult28-Nov-07 14:50
mvePIEBALDconsult28-Nov-07 14:50 
Skippums wrote:
the removal of the ever useful typedef


"When Anders closes a door he usually opens a window someplace."

No one showed you the C# way? Won't this work for you?

C#
// Uncomment one of these
// using MyType = System.Int32 ;
// using MyType = System.Double ;
// using MyType = System.Decimal ;
// using MyType = System.String ;
 
namespace Test
{
    class Test
    {
        private static MyType
        F
        (
            MyType x
        )
        {
            return ( x + x ) ;
        }
 
        [System.STAThreadAttribute]
        static void
        Main
        (
            string[] args
        )
        {
            try
            {
                System.Console.WriteLine ( F ( 2 ) ) ;
            }
            catch ( System.Exception err )
            {
                System.Console.WriteLine ( err.Message ) ;
            }
 
            return ;
        }
    }
}


Of course C/C++ header files make using typedefs easier, whereas each C# file would need to have the using directive. On the other hand, you can pass C# code through the C-preprocessor if you want.
GeneralRe: Why I hate C# Pin
Skippums29-Nov-07 4:13
Skippums29-Nov-07 4:13 
GeneralRe: Why I hate C# Pin
PIEBALDconsult29-Nov-07 5:00
mvePIEBALDconsult29-Nov-07 5:00 
GeneralRe: Why I hate C# Pin
Skippums29-Nov-07 5:03
Skippums29-Nov-07 5:03 
AnswerRe: Why I hate C# Pin
Bino B28-Nov-07 15:39
Bino B28-Nov-07 15:39 
AnswerRe: Why I hate C# Pin
Skippums29-Nov-07 4:10
Skippums29-Nov-07 4:10 
QuestionGetting the names of files have extension of mp3 from filesystem?? Pin
omegazafer28-Nov-07 11:57
omegazafer28-Nov-07 11:57 
AnswerRe: Getting the names of files have extension of mp3 from filesystem?? Pin
Anthony Mushrow28-Nov-07 12:10
professionalAnthony Mushrow28-Nov-07 12:10 
GeneralRe: Getting the names of files have extension of mp3 from filesystem?? Pin
Jared Bienz [MSFT]28-Nov-07 12:33
Jared Bienz [MSFT]28-Nov-07 12:33 
AnswerRe: Getting the names of files have extension of mp3 from filesystem?? Pin
Skippums28-Nov-07 12:22
Skippums28-Nov-07 12:22 
GeneralRe: Getting the names of files have extension of mp3 from filesystem?? Pin
Anthony Mushrow28-Nov-07 12:26
professionalAnthony Mushrow28-Nov-07 12:26 
AnswerRe: Getting the names of files have extension of mp3 from filesystem?? Pin
Luc Pattyn28-Nov-07 12:28
sitebuilderLuc Pattyn28-Nov-07 12:28 
GeneralRe: Getting the names of files have extension of mp3 from filesystem?? Pin
Jared Bienz [MSFT]28-Nov-07 12:36
Jared Bienz [MSFT]28-Nov-07 12:36 
GeneralRe: Getting the names of files have extension of mp3 from filesystem?? Pin
Luc Pattyn28-Nov-07 21:50
sitebuilderLuc Pattyn28-Nov-07 21:50 
AnswerRe: Getting the names of files have extension of mp3 from filesystem?? Pin
omegazafer28-Nov-07 12:41
omegazafer28-Nov-07 12:41 
QuestionIdentifier Expected Pin
murtle328-Nov-07 11:31
murtle328-Nov-07 11:31 
AnswerRe: Identifier Expected Pin
Luc Pattyn28-Nov-07 11:38
sitebuilderLuc Pattyn28-Nov-07 11:38 
GeneralRe: Identifier Expected Pin
murtle328-Nov-07 12:00
murtle328-Nov-07 12:00 

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.