Click here to Skip to main content
15,905,781 members

Comments by Eranga Dayarathne (Top 5 by date)

Eranga Dayarathne 18-Oct-18 22:34pm View    
So in this case it's work. thanks. but when i equal this format to again datetime variable it show MM/dd/yyyy format.

this is the wahy i did,

string format = "dd/MM/yyyy";

if (DateTime.TryParseExact(dtime, format,
System.Globalization.CultureInfo.InvariantCulture, DateTimeStyles.None, out Temdate))
{
labelinfor.MinimumExpiryDate = Temdate;
}

SysLog.WriteLog(MSLogLevel.INFORMATIONAL, "Trace ExpiryDate - " + labelinfor.ExpiryDate);


"labelinfor.MinimumExpiryDate is a datetime varible"

private DateTime expiryDate = DateTime.Now;

public DateTime ExpiryDate
{
get
{
return expiryDate;
}
set
{
expiryDate = value;
}
}


why it's again change when i equal to datetime ?
Eranga Dayarathne 18-Oct-18 22:34pm View    
So in this case it's work. thanks. but when i equal this format to again datetime variable it show MM/dd/yyyy format.

this is the wahy i did,

string format = "dd/MM/yyyy";

if (DateTime.TryParseExact(dtime, format,
System.Globalization.CultureInfo.InvariantCulture, DateTimeStyles.None, out Temdate))
{
labelinfor.MinimumExpiryDate = Temdate;
}

SysLog.WriteLog(MSLogLevel.INFORMATIONAL, "Trace ExpiryDate - " + labelinfor.ExpiryDate);


"labelinfor.MinimumExpiryDate is a datetime varible"

private DateTime expiryDate = DateTime.Now;

public DateTime ExpiryDate
{
get
{
return expiryDate;
}
set
{
expiryDate = value;
}
}


why it's again change when i equal to datetime ?
Eranga Dayarathne 12-Mar-18 7:51am View    
i do the same thing and service run well. but meanwhile i debug the programme same error come. why it's appear again.
Eranga Dayarathne 12-Mar-18 7:50am View    
i do the same thing and service run well. but meanwhile i debug the programme same error come. why it's appear again.
Eranga Dayarathne 7-Jul-15 2:22am View    
I just want to save respond body to text file. before that I want to get respond body string variable.

help me to get respond body. here is the sample I tried

using (Stream receiveStream = httpAppRespond.Context.Response.OutputStream)
{

using (StreamReader readStream = new StreamReader(receiveStream))
{
string respond = readStream.ReadToEnd();
}


}