Tuesday

c# parse string into enum


public enum enmode
{
fee , scheduledpayment , adjustment , new1 , del , cancel , freeze
}


Propery convering string from Request["mode"] into enum:

public enmode Mode
{
get { return (enmode) Enum.Parse(typeof (enmode), Request["m"].ToLower()); }
}

more...

No comments:

test smtp server with powershell

Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body ...