|
Hi
Is there any possibillity to send a mail using POP3?
if so, tell me how?
|
|
|
|
|
No, not possible. POP3 recieves mail, SMTP sends it. Sending mail with C# is trivial, try reading the article I link to in my sig if you need help.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
POP3 is intended to recieve/check emails and SMTP is for sending an email.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hello everyone,
In C++ template, the type parameter will be deduced when we use it, and compiler will generate the speicifc version of template function/class -- called instantiation.
In C#, it is also compiler will do the instantiation at compile time other than runtime? For example, if we use int and string for List<T>, then two versions of List class, List<int> and List<string> will be generated in IL -- which will make IL bigger?
thanks in advance,
George
|
|
|
|
|
George_George wrote: For example, if we use int and string for List<t>, then two versions of List class, List<int> and List<string> will be generated in IL -- which will make IL bigger?
The specific types are generated at compile time. However, I don't know exactly if they are generated by the C# compiler (and end up in the IL code) or by the JIT compiler (and only end up in the native code). I think that it's the later, though, as generic types is a feature of the CRL and not only in C#.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
It has to be in CLR because if you use a List of MyOwnForm or another selfmade class, the Compiler won't know this class exists when he makes the program/library for that generic class
|
|
|
|
|
hoffmale wrote: It has to be in CLR because if you use a List of MyOwnForm or another selfmade class, the Compiler won't know this class exists when he makes the program/library for that generic class
I don't follow you reasoning... You can't use a class in a generic list, that the compiler doesn't know exists.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanks Guffa,
What means "can't use a class in a generic list"?
regards,
George
|
|
|
|
|
George_George wrote: What means "can't use a class in a generic list"?
If you use a class in the generic List<T> class:
List<FooBar> aSpecialList = new List<FooBar>();
The compiler needs to know what FooBar is, otherwise the code won't compile.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I do not think your above code will break compiler from compiling if FooBar is a class name somewhere defined. What do you mean "The compiler needs to know what FooBar is, otherwise the code won't compile."? Could you show some code here please? I think there are some confusing.
regards,
George
|
|
|
|
|
George_George wrote: I do not think your above code will break compiler from compiling if FooBar is a class name somewhere defined.
That's what I'm saying.
George_George wrote: What do you mean "The compiler needs to know what FooBar is, otherwise the code won't compile."?
I mean that if FooBar isn't defined anywhere, the compiler can't compile the code.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanks Guffa,
Your description is clear.
regards,
George
|
|
|
|
|
Thanks hoffmale,
"It has to be ", it means generating code for each specific type according to type parameter of the geenrics type?
regards,
George
|
|
|
|
|
Thanks Guffa,
I took some study these days. One more question about the following link,
http://msdn.microsoft.com/en-us/library/f4a6ta2h(VS.80).aspx
For reference type, all generics types will share one instance of native code. In the following case, type Foo<Goo1> and Foo<Goo2> (suppose Goo1 and Goo2 are both reference types) will share one static member if we have one static member defined in type Foo<>?
regards,
George
|
|
|
|
|
George_George wrote: In the following case, type Foo<goo1> and Foo<goo2> (suppose Goo1 and Goo2 are both reference types) will share one static member if we have one static member defined in type Foo<>?
No. If Goo1 and Goo2 are different types, Foo<Goo1> and Foo<Goo2> will have separate sets of static members.
(I have tested this, to be absolutely sure.)
This doesn't neccesary contradict what's said in the article. The types Foo<Goo1> and Foo<Goo2> can have separate storage space for static members, but still use the same generated code for methods.
Edit:
Forgot to html encode some angle brackets...
Despite everything, the person most likely to be fooling you next is yourself.
modified on Thursday, May 8, 2008 6:39 PM
|
|
|
|
|
Thanks Guffa,
I agree with the following statement -- "The types Foo and Foo can have separate storage space for static members". But is it from the article?
regards,
George
|
|
|
|
|
No, the article doesn't say anything about the static storage space for generic types.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanks Guffa,
1.
For "static storage space for generic types" for different parameter types of a generics type will share different storage?
2.
Are there any documents beyond this article of this topic?
regards,
George
|
|
|
|
|
George_George wrote: For "static storage space for generic types" for different parameter types of a generics type will share different storage?
To "share different storage" sounds like a contradiction...
The types Foo<Bar1> and Foo<Bar2> are separate types, so they will each have threir own set of static variables. All instances of the Foo<Bar1> class will share the same set of static variables.
George_George wrote: Are there any documents beyond this article of this topic?
You always have the language specification:
ECMA C# and Common Language Infrastructure Standards[^]
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Great Guffa!
I have read parts of the documents before for the interested parts. But the total part is too big.
Any ideas about which part of this documents covers different reference type parameter for a generics type will share different static storage in this document?
regards,
George
|
|
|
|
|
Hi All,
My requirement is to call a function for creating data in one system.Each function calls will create one user credentials in the system and for this i'm calling this function inside a "for" loop.And after the call returns im showing the result for each input in a datagrid.but this is consuming lot of time.
Coming to the point i want this to be executed using Threading.But i'm still a amateur in threading concept.I want the main thread to wait till all the worker threads completes it job and then execute the part where the result is shown.
The code snippet is like this
for(int i=0;i<noofusers;i++){>
userResult=callFunction(userDetails); //the function which i need to be called using threads
datagrid.source=userResult; //i want the for loop to continue but this binding should not happen until the current worker thread returns the result.
datagrid.bind();
} //i want the main thread not to go out of this loop until all worker thread returns or completes
private Result callFunction(){
......//here the user will be created in the system...
return result;
}
Please help me in this issue.
--
Thanks and Regards
KC
|
|
|
|
|
Threading doesn't work for a web app, it's a disconnected system. The user is not going to see anything until all the code runs.
AJAX is the way to do seperate calls so that your web Ui shows before all the calls have completed.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Graus,
I dont want the user see the result in datagrid untill all the data is inserted into the system.So that part of threading where the user can proceed working on the page while the thread is running in the background is not needed. My need is to save time by inserting multiple users into the sytem at almost the same time by the method of threading.And in Asp.net c# webapplication we have the option to do threading. But my problem is implementing my concept and thereby achieving the purpose.
You can see a similar method used in this page
http://www.c-sharpcorner.com/UploadFile/tinlam/MultithreadedWebApplications11172005002508AM/MultithreadedWebApplications.aspx[]
Please help me in this issue.
Thanks and Regards
KC
|
|
|
|
|
I can only reiterate - when your main page thread ends, your page will postback. Therefore, multi threading will not help your page speed, unless you have more than one machine to share the work . The one processor still needs to do it all, multi threaded or not. Yes, you can run multiple threads, it will NOT make your page faster, how can it ?
If you think otherwise, work the code from that article to do what yuo want, and see if it speeds things up.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,I am a student and i am new to issues regarding certificates and signing in .net.... In .net i created an application and iv used click once to sign my assembly..i have used a test certificate here and i have kept that in the trusted publisher list...and then i go to the publish tab and i go to http://localhost/mysite/publish.html..when i press install here it would raise a popup stating this is from a trusted publisher.. but when i use it from some other system.. and then say http://199.75.12.44/mysite/publish.html then it would pop up a security message stating unauthorized publisher... How can i avoid this pop up? Thanks and regards ananth
|
|
|
|