Click here to Skip to main content
16,014,765 members
Home / Discussions / C#
   

C#

 
QuestionIs C# compiler multi-core aware? Pin
Frank W. Wu6-Dec-10 2:54
Frank W. Wu6-Dec-10 2:54 
AnswerRe: Is C# compiler multi-core aware? Pin
Luc Pattyn6-Dec-10 3:37
sitebuilderLuc Pattyn6-Dec-10 3:37 
GeneralRe: Is C# compiler multi-core aware? Pin
Daniel Ruehmer20-Oct-11 23:39
Daniel Ruehmer20-Oct-11 23:39 
GeneralRe: Is C# compiler multi-core aware? Pin
Luc Pattyn21-Oct-11 1:48
sitebuilderLuc Pattyn21-Oct-11 1:48 
AnswerRe: Is C# compiler multi-core aware? Pin
Richard Deeming7-Dec-10 8:41
mveRichard Deeming7-Dec-10 8:41 
Questionemail from windows service Pin
arkiboys6-Dec-10 0:20
arkiboys6-Dec-10 0:20 
AnswerRe: email from windows service Pin
Pete O'Hanlon6-Dec-10 0:27
mvePete O'Hanlon6-Dec-10 0:27 
AnswerRe: email from windows service Pin
PIEBALDconsult6-Dec-10 2:29
mvePIEBALDconsult6-Dec-10 2:29 
I use this:

public static void
SendEmail
(
    string               Sender
,
    string               Recipient
,
    string               Subject
,
    string               Body
,
    string               SmtpServer
,
    System.IO.FileInfo[] Files
)
{
    System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage ( Sender , Recipient ) ;

    if ( Files != null )
    {
        System.Text.StringBuilder temp = new System.Text.StringBuilder ( Body ) ;

        temp.Append ( string.Format
        (
            "\n\n{0} attached file{1}:"
        ,
            Files.Length
        ,
            Files.Length==1?"":"s"
        ) ) ;

        foreach ( System.IO.FileInfo att in Files )
        {
            if ( att != null )
            {
                temp.Append ( "\n" + att.Name ) ;

                if ( att.Exists )
                {
                    msg.Attachments.Add ( new System.Net.Mail.Attachment ( att.FullName ) ) ;
                }
                else
                {
                    temp.Append ( " -- does not exist!" ) ;
                }
            }
        }

        Body = temp.ToString() ;
    }

    msg.Subject = Subject ;
    msg.Body    = Body ;

    System.Net.Mail.SmtpClient cl = new System.Net.Mail.SmtpClient ( SmtpServer ) ;
    cl.UseDefaultCredentials = true ;
    cl.Send ( msg ) ;

    return ;
}

QuestionDataBinding - CLR properties vs DependencyProperties Pin
devvvy5-Dec-10 23:07
devvvy5-Dec-10 23:07 
AnswerRe: DataBinding - CLR properties vs DependencyProperties Pin
Pete O'Hanlon5-Dec-10 23:54
mvePete O'Hanlon5-Dec-10 23:54 
QuestionTFS - Profile dotnet dll Pin
devvvy5-Dec-10 23:04
devvvy5-Dec-10 23:04 
Questionhow to detect display type : CRT or LCD ? [modified] Pin
scoket5-Dec-10 21:59
scoket5-Dec-10 21:59 
AnswerRe: how to detect display type : CRT or LCD ? Pin
OriginalGriff5-Dec-10 22:19
mveOriginalGriff5-Dec-10 22:19 
GeneralRe: how to detect display type : CRT or LCD ? Pin
scoket5-Dec-10 22:39
scoket5-Dec-10 22:39 
GeneralRe: how to detect display type : CRT or LCD ? Pin
fjdiewornncalwe6-Dec-10 1:44
professionalfjdiewornncalwe6-Dec-10 1:44 
AnswerRe: how to detect display type : CRT or LCD ? Pin
Eddy Vluggen5-Dec-10 22:30
professionalEddy Vluggen5-Dec-10 22:30 
GeneralRe: how to detect display type : CRT or LCD ? Pin
scoket5-Dec-10 22:41
scoket5-Dec-10 22:41 
QuestionSend SMS Pin
anishkannan5-Dec-10 20:30
anishkannan5-Dec-10 20:30 
AnswerRe: Send SMS Pin
Luc Pattyn5-Dec-10 21:26
sitebuilderLuc Pattyn5-Dec-10 21:26 
AnswerRe: Send SMS Pin
db7uk6-Dec-10 23:25
db7uk6-Dec-10 23:25 
QuestionEvents in Interfaces Pin
Richard Andrew x645-Dec-10 15:38
professionalRichard Andrew x645-Dec-10 15:38 
AnswerRe: Events in Interfaces Pin
Not Active5-Dec-10 16:30
mentorNot Active5-Dec-10 16:30 
GeneralRe: Events in Interfaces Pin
Richard Andrew x645-Dec-10 16:34
professionalRichard Andrew x645-Dec-10 16:34 
Questionevents between two threads Pin
igalep1325-Dec-10 8:03
igalep1325-Dec-10 8:03 
AnswerRe: events between two threads Pin
Luc Pattyn5-Dec-10 8:45
sitebuilderLuc Pattyn5-Dec-10 8:45 

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.