image - C# reference comparison -
Do anyone know what can be wrong, when you have two I have some But the following code generates the result I can not quite understand: The thing is that The debugger shows that the image object has a property named This memory pointer changes all the time and I think that some kind of cloning is here, but I do not understand what I really need to do. What I am doing is doing wrong and how do I Thank you. without < Code> ToList () , it does not work clearly, I am very stupid. Thanks everyone. Remember that each time you call system.Drawing.Image Organizations trying to compare?
IEnumerable & lt; Image & gt;
Image. Using the Forfile (Path) method
foreach (var image1 in images) {foreach (images in var image2) {if (image1 == image2) {// (do something!)}}}
(do something!) The part is never called.
nativeImage , which I think is a raw memory pointer, because
System.Drawing.Image is implemented using Marshalling.
System.Drawing.Image objects to a
IEnumerable & lt; & Gt; to see if they are similar?
update
var path = new list & lt; String & gt; {"Test / 1_1.jpg", "test / 1_2.jpg"}; IEnumerable & lt; Image & gt; Figure = Path. Select (path = & gt; image.framefile (path)). ToList (); Foreach (image image in the image) {foreach (image image2) in images {if (rectangle (image 1, image 2)} {}}}
GetEnumerator Call
MoveNext . What you need to do is repetition force in a list.
var imageList = images.ToList ();
Comments
Post a Comment