Domanda

I memorizzare informazioni sulle immagini in un database - anche la loro FormatoImmagine (jpeg, png ecc)

.
Console.WriteLine(System.Drawing.Imaging.ImageFormat.Jpeg.Guid);  

Outputs: b96b3cae-0728-11d3-9d7b-0000f81ef32e

Voglio conservare questo nel database come un GUID -. E leggere dal database e ottenere il FormatoImmagine associato

Come ho lanciato il GUID b96b3cae-0728-11d3-9d7b-0000f81ef32e per System.Drawing.Imaging.ImageFormat.Jpeg.Guid ?

È stato utile?

Soluzione

Per impostare un System.Guid al < a href = "http://msdn.microsoft.com/en-us/library/system.drawing.imaging.imageformat.aspx" rel = "nofollow noreferrer"> System.Drawing.Imaging.ImageFormat 's costruttore , e si può leggere indietro usando il suo Guid immobili .

Un System.Guid ha parecchi costruttori , tra cui una stringa costruttore .

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top