Click here to Skip to main content
15,891,762 members
Home / Discussions / C#
   

C#

 
QuestionI am not able to see large icon in list view Pin
Naveed72730-Apr-08 21:48
Naveed72730-Apr-08 21:48 
AnswerRe: I am not able to see large icon in list view Pin
Christian Graus30-Apr-08 23:07
protectorChristian Graus30-Apr-08 23:07 
Questiontriggers with a stored procedure Pin
Member 400849230-Apr-08 21:37
Member 400849230-Apr-08 21:37 
AnswerRe: triggers with a stored procedure Pin
Christian Graus30-Apr-08 23:07
protectorChristian Graus30-Apr-08 23:07 
Questionrun asp.net appn on iis Pin
Member 443208630-Apr-08 21:02
Member 443208630-Apr-08 21:02 
AnswerRe: run asp.net appn on iis Pin
som.nitk30-Apr-08 21:35
som.nitk30-Apr-08 21:35 
AnswerRe: run asp.net appn on iis Pin
Christian Graus30-Apr-08 23:09
protectorChristian Graus30-Apr-08 23:09 
QuestionHow to get all files name from Property.Resourece Pin
Guru Call30-Apr-08 20:32
Guru Call30-Apr-08 20:32 
AnswerRe: How to get all files name from Property.Resourece Pin
Gopal.S1-May-08 1:34
Gopal.S1-May-08 1:34 
QuestionDisplaying lines of code as a program runs Pin
MarkB77730-Apr-08 20:13
MarkB77730-Apr-08 20:13 
AnswerRe: Displaying lines of code as a program runs Pin
Christian Graus30-Apr-08 20:15
protectorChristian Graus30-Apr-08 20:15 
GeneralRe: Displaying lines of code as a program runs Pin
Roger Alsing30-Apr-08 21:48
Roger Alsing30-Apr-08 21:48 
QuestionFile Structure Serialization Pin
Ian Uy30-Apr-08 20:05
Ian Uy30-Apr-08 20:05 
AnswerRe: File Structure Serialization Pin
carbon_golem1-May-08 2:59
carbon_golem1-May-08 2:59 
GeneralRe: File Structure Serialization Pin
Ian Uy1-May-08 3:05
Ian Uy1-May-08 3:05 
carbon_golem wrote:
What are you encrypting, and why a Hashtable?


Long Long Discussion.


carbon_golem wrote:
2) Why did you choose a struct?


Is there any other option?


carbon_golem wrote:
3) Have you checked the post-RawSerialize() byte arrays to verify sizes?


Yes, the output byte lenght is correct.


carbon_golem wrote:
4) Are you using unmanaged code in your project?

I'm not sure... Sniff | :^)


carbon_golem wrote:
Go back on the Net and study up on the difference between ValueTypes and ReferenceTypes.

I'm sure I know the difference between the two. Laugh | :laugh:


carbon_golem wrote:
Use caution when you snag some code, you'll have to understand what's going on.

I've already analyzed that piece of code and found out that I don't really need it.


So what I did is a simpler approach:

[Serializable]<br />
struct LockFile<br />
{<br />
    public string MagicNumber;<br />
    public Hashtable IncrementalMappingArray;<br />
}

<br />
       private byte[] RawSerialize(object anything)<br />
        {<br />
            MemoryStream Stream = new MemoryStream();<br />
            BinaryFormatter BF = new BinaryFormatter();<br />
            BF.Serialize(Stream, anything);<br />
            byte[] Data = Stream.ToArray();<br />
            return Data;<br />
        }<br />
<br />
        private object RawDeserialize(byte[] byteStream)<br />
        {<br />
            MemoryStream Stream = new MemoryStream(byteStream);<br />
            BinaryFormatter BF = new BinaryFormatter();<br />
            object thisObject = BF.Deserialize(Stream);<br />
            return thisObject;<br />
        }


It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.

GeneralRe: File Structure Serialization Pin
carbon_golem1-May-08 3:41
carbon_golem1-May-08 3:41 
GeneralRe: File Structure Serialization Pin
Ian Uy1-May-08 3:49
Ian Uy1-May-08 3:49 
GeneralRe: File Structure Serialization Pin
carbon_golem1-May-08 3:57
carbon_golem1-May-08 3:57 
QuestionPlease Help !Query executing in oracle but not executing through code Pin
ravindradonkada30-Apr-08 19:46
ravindradonkada30-Apr-08 19:46 
AnswerRe: Please Help !Query executing in oracle but not executing through code Pin
Christian Graus30-Apr-08 20:18
protectorChristian Graus30-Apr-08 20:18 
AnswerRe: Please Help !Query executing in oracle but not executing through code [modified] Pin
Mircea Puiu1-May-08 4:46
Mircea Puiu1-May-08 4:46 
QuestionDetect Shift when Menu Opens Pin
Chris_McGrath30-Apr-08 19:28
Chris_McGrath30-Apr-08 19:28 
AnswerRe: Detect Shift when Menu Opens Pin
Chris_McGrath30-Apr-08 19:45
Chris_McGrath30-Apr-08 19:45 
QuestionHOW TO CREATE AN INSTANCE OF INTERNET EXPLORER AND HOW TO USE IT? Pin
syamooo30-Apr-08 18:55
syamooo30-Apr-08 18:55 
AnswerRe: HOW TO CREATE AN INSTANCE OF INTERNET EXPLORER AND HOW TO USE IT? Pin
Christian Graus30-Apr-08 19:18
protectorChristian Graus30-Apr-08 19:18 

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.