Click here to Skip to main content
16,020,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can i "overwrite"
C#
internal void PrepareHeaders(bool sendEnvelope) { }

method in
internal class Message { }

?

I would like to turn off the automatic overwrite of the Date header, and it is in this method.
Posted
Updated 13-Jul-13 21:48pm
v2
Comments
StM0n 14-Jul-13 5:56am    
Are you aware of the fact, that you are talking about a method and a class?
tothrob 14-Jul-13 6:01am    
Yes. What is the problem with it?

Further to solution 1 and because you use the words "How can I" ...

You need to do a little research around polymorphism (and inheritance)

Here's a start point at MSDN[^]
 
Share this answer
 
Comments
tothrob 14-Jul-13 6:21am    
Thanks, i went over this already.
Hi
You can only override Abstract or Virtual method.
If you can override PrepareHeaders method, you must define PrepareHeaders as abstract or virtual method.

I hope it's helpful for you.
 
Share this answer
 
Comments
tothrob 14-Jul-13 6:15am    
Sure, this is clear.
I forgot to say that this Message Class came with Visual Studio. And it does not have the virtual keyword. If it had, this question would not exist :)

But i hope there is some hack, similar to this:
http://www.codeproject.com/Articles/76607/Easily-Retrieve-Email-Information-from-EML-Files-R

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900