GetFieldsByName
DocumentData.GetFieldsByName method
फ़ील्ड डेटा का संग्रह लौटाता है जहाँ नाम इसके बराबर होता हैfieldName .
public IList<FieldData> GetFieldsByName(string fieldName)
| पैरामीटर | प्रकार | विवरण | 
|---|---|---|
| fieldName | String | मैदान का नाम। | 
प्रतिलाभ की मात्रा
का एक संग्रहFieldData वस्तुएं; कोई फ़ील्ड डेटा नहीं मिलने पर खाली संग्रह।
उदाहरण
फ़ील्ड नाम से फ़ील्ड खोजें:
FieldData वर्ग फ़ील्ड डेटा का प्रतिनिधित्व करता है। मैदान पर निर्भर करता हैPageArea property में इनमें से कोई भी विरासत हो सकती हैPageArea कक्षा। उदाहरण के लिए,ParseForm method केवल टेक्स्ट फ़ील्ड निकालता है।
// "पता" नाम के साथ सभी फ़ील्ड प्राप्त करें
IList<FieldData> addressFields = data.GetFieldsByName("Address");
if(addressFields.Count == 0) {
    Console.WriteLine("Address not found");
}
else {
    Console.WriteLine("Address");
    // खेतों के संग्रह पर पुनरावृति करें
    for (int i = 0; i < addressFields.Count; i++) {
        PageTextArea area = addressFields[i].PageArea as PageTextArea;
        Console.WriteLine(area == null ? "Not a template field" : area.Text);       
         
        // यदि यह संबंधित क्षेत्र है:
        if(addressFields[i].LinkedField != null) {
            Console.Write("Linked to ");
            PageTextArea linkedArea = addressFields[i].LinkedField.PageArea as PageTextArea;
            Console.WriteLine(area == null ? "Not a template field" : area.Text);           
        }
    }
}
यह सभी देखें
- class FieldData
 - class DocumentData
 - नाम स्थान GroupDocs.Parser.Data
 - सभा GroupDocs.Parser