|
the problem is i am deploying solution using clickonce and now the size is 80 mb, the more i reduce the faster it gets copied to client machine, thats my goal.
|
|
|
|
|
I don't really know a lot about this. But I guess that you have many pictures in your app?
If that's true, then you should try and make the pictures smaller. If this doesn't work, I don't know either.
|
|
|
|
|
thanks for the tip. I have lot of icons and png files, let me check if removing unused of them will reduce size.
|
|
|
|
|
I wrote code to send/receive e-mails using COM and MAPI many years ago. There must have been some progress since then. I know sending e-mails from .NET program is easy. How to read e-mails from .NET program? Any help is appreciated. Thanks.
modified on Thursday, February 12, 2009 3:39 PM
|
|
|
|
|
Nothing is built in to .NET as far as I know.
There are several third-party components that will talk to email servers, though. If you want to talk to an email program, I think COM/MAPI is still it.
|
|
|
|
|
its strange question from you. i checked twice... but its you.
ok dont take offence. I feel odd because, i read many of your article and you are at platinum level, so you can find this info easily from google or codeproject thatswhy... i am just kidding...
modified on Thursday, February 12, 2009 3:31 PM
|
|
|
|
|
Rutvik Dave wrote: ok dont take offence.
No problem, I am not Chuck Norris.
P.S. When I google with "receive mail .net", all I get is reference on how to send e-mail in .net.
|
|
|
|
|
Xiangyang Liu ??? wrote: No problem
Thanks...
I am sorry but when i read this tread, I also think of sending the mail which is tooooo easy. so thats my fault.
have look at this[^] or this[^]
|
|
|
|
|
|
I was hoping to avoid low-level coding in C#, but I will take a look at the article. Thanks.
|
|
|
|
|
.Net does not has native support for this (but you could build your own component using sockets and others *low* level components), as others have said, exists third party components that will do this for you, one of them is:
http://www.chilkatsoft.com/Email-DotNet.asp[^]
Hope this helps.
|
|
|
|
|
Thanks, I will take a look.
|
|
|
|
|
Hello,
I'm trying to read a RSS from within a C# code like this (I found this example on the internet):
XmlTextReader rssReader;
XmlDocument rssDoc;
XmlNode nodeRss=null;
rssReader = new XmlTextReader( *** URL *** );
rssDoc = new XmlDocument();
rssDoc.Load(rssReader);
for (int i = 0; i < rssDoc.ChildNodes.Count; i++)
if (rssDoc.ChildNodes[i].Name == "rss")
for (int ii = 0; ii < nodeRss.ChildNodes.Count; ii++)
if (nodeRss.ChildNodes[ii].Name == "channel")
nodeChannel = nodeRss.ChildNodes[ii];
This works fine for most of the RSS I tried. But it doesn't work with this one:
http://www.klack.de/include/generateRSS.php?TYPE=TVPLANER&ID=d7fdb37979873520025e66554beb532d3065904
I get an exception on "rssDoc.Load(rssReader);": The main element is not available. (translated from german).
Does anybody know how I can fix or get around this ?
Thanks !
Georg
|
|
|
|
|
There is no RSS feed at that link?
|
|
|
|
|
well, yes there is - at least FireFox can handle it as a RSS feed.
|
|
|
|
|
No, there isn't. I get a response with the length zero:
Date: Fri, 13 Feb 2009 01:37:56 GMT
Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch11
X-Powered-By: PHP/5.2.0-8+etch11
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Via: 1.1 www.klack.de
Keep-Alive: timeout=15, max=500
Connection: Keep-Alive
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
I tried "RSS 2.0 Framework" but it gets into the same trouble. That's why
I tried to run something more simple - with the same result.
|
|
|
|
|
I was told that the most common method to convert a value is to use the Parse method, however it only works with strings, as you all know...
So I was wondering, then: if you're converting a non-string value to another non-string, is it better/more efficient to use for example...
Convert.ToInt32(value);
or
int.Parse(value.ToString());
Thanks guys!
|
|
|
|
|
Hi,
it depends on the Type of your value:
if value is a string, then value.ToString() is redundant, and both Convert and int.Parse would behave identically (in fact one is calling the other).
if value is some kind of integer to begin with, Convert.ToInt32() is much faster, since no conversion from integer to string, and no conversion from string to int are involved.
if value is something else (a DateTime, a user-defined type, ...) Convert will not accept it,
whereas the value.ToString() result may or may not look like an integer, and be acceptable to int.Parse
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:02 AM
|
|
|
|
|
Luc summed it up well, but I just wanted to add one other non-obvious difference.
With value = null;
Convert.ToInt32(value) returns 0
int.Parse(value.ToString()) throws NullReferenceException.
int.Parse(value) throws ArgumentNullException. (if value is String)
|
|
|
|
|
hi,
look at the int.TryParse(object,out bool) functionality.
The boolean value stands up for true (parseable) and false(not parseable) about trying to parse the value. There will be no exception raised. if you want to use int.Parse instead of TryParse you need to catch the exception with try catch..
bless
|
|
|
|
|
In my opinion the only worthwhile member of Convert is System.Convert.ChangeType , will that do what you want?
Otherwise, maybe a simple cast is what you want?
Or, if it's a type of your own creation, perhaps an implicit conversion operator?
You would have to give us more information.
|
|
|
|
|
Hijack
If you have 2 classes that are identical (set of credentials) can you use System.Convert.ChangeType to convert one to the other?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
The most common method to convert a non-string value to an int is implicit or explicit casting. Example:
byte b = 42;
int answer = b;
double d = 42.0;
int answer = (int)d;
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|