Click here to Skip to main content
15,901,205 members
Home / Discussions / C#
   

C#

 
GeneralRe: catch keystroke Pin
sharpiesharpie5-Feb-07 5:02
sharpiesharpie5-Feb-07 5:02 
QuestionFileNotFound Error when trying instantiate XMLSerializer with array Pin
Florian Storck5-Feb-07 4:07
Florian Storck5-Feb-07 4:07 
AnswerRe: FileNotFound Error when trying instantiate XMLSerializer with array Pin
Marc Clifton5-Feb-07 4:20
mvaMarc Clifton5-Feb-07 4:20 
GeneralRe: FileNotFound Error when trying instantiate XMLSerializer with array Pin
Florian Storck5-Feb-07 4:24
Florian Storck5-Feb-07 4:24 
GeneralRe: FileNotFound Error when trying instantiate XMLSerializer with array Pin
Marc Clifton5-Feb-07 4:29
mvaMarc Clifton5-Feb-07 4:29 
GeneralRe: FileNotFound Error when trying instantiate XMLSerializer with array Pin
Florian Storck5-Feb-07 4:31
Florian Storck5-Feb-07 4:31 
GeneralRe: FileNotFound Error when trying instantiate XMLSerializer with array Pin
Marc Clifton5-Feb-07 4:44
mvaMarc Clifton5-Feb-07 4:44 
GeneralRe: FileNotFound Error when trying instantiate XMLSerializer with array Pin
Florian Storck5-Feb-07 4:58
Florian Storck5-Feb-07 4:58 
Hello Marc,

some other strange thing is, that the VisualStudio catches the Exception, but I don't get the Exception in my own exception handler. Even if I switch off all Exception in Debug->Exceptions in VS, the Exception handler isn't called.

<br />
                if (m_dicXmlSerCache.ContainsKey(TObj))<br />
                {<br />
                    // m_Log.DebugFormat("<XML> Serializer Cache Hit: Type {0}", TObj)<br />
                    m_dicCacheHits[TObj]++; // for statistic purposes<br />
                    return m_dicXmlSerCache[TObj];<br />
                }<br />
                else<br />
                {<br />
                        XmlSerializer tSer = new XmlSerializer(TObj);<br />
                       m_dicXmlSerCache.Add(TObj, tSer);<br />
<br />
                       // just for keeping track of some statistics <br />
                       m_dicCacheHits.Add(TObj, 1);<br />
<br />
                       tSer.UnknownAttribute += new XmlAttributeEventHandler(XML_UnknownAttribute);<br />
                       tSer.UnknownElement += new XmlElementEventHandler(XML_UnknownElement);<br />
                       tSer.UnknownNode += new XmlNodeEventHandler(XML_UnknownNode);<br />
                       tSer.UnreferencedObject += new UnreferencedObjectEventHandler(XML_UnreferencedObject);<br />
                       return tSer;<br />
                }<br />
            }<br />
            catch (Exception e)<br />
            {<br />
                m_Log.ErrorFormat("Error in SerializerCache: {0}", e.Message);<br />
            }<br />


For explanation:
This Code acts as a cache for various serializer objects, to avoid unnecessary instantiations.

I've no real idea, why also my exception handler doesn't work here...

Bye,
Florian
GeneralRe: FileNotFound Error when trying instantiate XMLSerializer with array Pin
Marc Clifton5-Feb-07 5:04
mvaMarc Clifton5-Feb-07 5:04 
GeneralRe: FileNotFound Error when trying instantiate XMLSerializer with array Pin
Florian Storck5-Feb-07 5:08
Florian Storck5-Feb-07 5:08 
QuestionQuestion in Application Deployment Pin
anu815-Feb-07 3:08
anu815-Feb-07 3:08 
AnswerRe: Question in Application Deployment Pin
sharpiesharpie5-Feb-07 4:31
sharpiesharpie5-Feb-07 4:31 
GeneralRe: Question in Application Deployment Pin
anu815-Feb-07 19:37
anu815-Feb-07 19:37 
QuestionHow to create a fake file Pin
sharpiesharpie5-Feb-07 3:07
sharpiesharpie5-Feb-07 3:07 
AnswerRe: How to create a fake file Pin
Dan Neely5-Feb-07 5:32
Dan Neely5-Feb-07 5:32 
GeneralRe: How to create a fake file Pin
sharpiesharpie5-Feb-07 5:44
sharpiesharpie5-Feb-07 5:44 
GeneralRe: How to create a fake file Pin
Dan Neely5-Feb-07 7:00
Dan Neely5-Feb-07 7:00 
AnswerRe: How to create a fake file Pin
Ennis Ray Lynch, Jr.5-Feb-07 6:01
Ennis Ray Lynch, Jr.5-Feb-07 6:01 
GeneralSorry Pin
Ennis Ray Lynch, Jr.5-Feb-07 8:17
Ennis Ray Lynch, Jr.5-Feb-07 8:17 
AnswerSparse Files Pin
Luc Pattyn5-Feb-07 9:27
sitebuilderLuc Pattyn5-Feb-07 9:27 
Questionrichtextbox Pin
sahelearamesh5-Feb-07 2:22
sahelearamesh5-Feb-07 2:22 
AnswerRe: richtextbox Pin
quiteSmart5-Feb-07 2:56
quiteSmart5-Feb-07 2:56 
GeneralRe: richtextbox Pin
netJP12L5-Feb-07 5:58
netJP12L5-Feb-07 5:58 
AnswerRe: richtextbox Pin
Ravi Bhavnani5-Feb-07 7:33
professionalRavi Bhavnani5-Feb-07 7:33 
AnswerRe: richtextbox Pin
Pratik Vasant Shah5-Feb-07 20:11
Pratik Vasant Shah5-Feb-07 20:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.