c# - 'Class' is a 'type' but is used like a 'variable' -
i'm coding application uses fingerprint reader capture images of someone's fingerprints , save in database.
i'm busy converting vb logic c#, i'm stuck here...
within main form have 2 classes: fingerprints , fingerimage respectively.
my issue following:
from fingerprints class, needed reference fingerimage class. here's code clarity:
this method derived fingerprint class, references fingerimage class:
public byte[] getimagefromfinger(string finger) { foreach (fingerimage fi in fingerimage) { if (fi.finger == finger) return fi.image; } return null; }
my problem error can't seem fix...fingerimage 'type' used 'variable'.
i need loop through class 10 times, once each finger, i'm doing wrong , think it's small. appreciated.
furthermore, here's code fingerimage class, in case...
public class fingerimage : frmfingerprintsmain { private byte[] _image; private string _finger; public fingerimage(byte[] image, string finger) { image = image; finger = finger; } public byte[] image { { return _image; } set { _image = value; } } public string finger { { return _finger; } set { _finger = value; } } }
you getting error because have no variable named fingerimage
. have type called fingerimage
.
you need collection of fingerimage
s somewhere iterate through.
Comments
Post a Comment