Property tidak bisa jadi parameter

3 views
Skip to first unread message

thomas 'znal' ramdhan

unread,
Oct 10, 2009, 7:54:04 PM10/10/09
to bin...@googlegroups.com
Dear all bind-c'ers

Saya sedang membuat bebrapa class library, dan mengalami error ni waktu memasukkan parameter property di initialize classnya:

Inconsistent accessibility: parameter type 'KGRelations.KGRules[]' is less accessible than method 'KGRelations.KGCausative.KGCausative(KGRelations.KGRules[], KGRelations.WordTags[], KGRelations.WordIndexing[])'

property classnya adalah:

public class KGRules
    {
        public string RuleType { get; set; }    
        public int SeqID { get; set; }
        public int RuleID { get; set; }
        public string RuleDesc { get; set; }
    }

cara saya memanggilnya:

public KGCausative(KGRules[] _TempKGRules, WordTags[] _TempTaggedWord, WordIndexing[] _TempWeightedWord)

Apa karena class library variabel itu tidak bisa dijadikan parameter ya? padahal di windows project biasa bisa.

Thanks,

Zainal


--
ne faites pas une limite pour votre competence
-------------------------------------------------------------------------
bilden Sie nicht eine Begrenzung fur Ihre Fahigkeit
-------------------------------------------------------------------------
non faccia un limite per la vostra abilita
-------------------------------------------------------------------------
--(-@

Basirudin Rachman

unread,
Oct 11, 2009, 1:37:05 AM10/11/09
to bin...@googlegroups.com
Boleh tau deklarasi KGRules[] di dalam class KGCausative? 

Curiganya private atau internal.


On Sun, Oct 11, 2009 at 6:54 AM, thomas 'znal' ramdhan <thomas...@gmail.com> wrote:
Dear all bind-c'ers

Saya sedang membuat bebrapa class library, dan mengalami error ni waktu memasukkan parameter property di initialize classnya:

Inconsistent accessibility: parameter type 'KGRelations.KGRules[]' is less accessible than method 'KGRelations.KGCausative.KGCausative(KGRelations.KGRules[], KGRelations.WordTags[], KGRelations.WordIndexing[])'

property classnya adalah:

public class KGRules
    {
        public string RuleType { get; set; }    
        public int SeqID { get; set; }
        public int RuleID { get; set; }
        public string RuleDesc { get; set; }
    }

cara saya memanggilnya:

public KGCausative(KGRules[] _TempKGRules, WordTags[] _TempTaggedWord, WordIndexing[] _TempWeightedWord)

Apa karena class library variabel itu tidak bisa dijadikan parameter ya? padahal di windows project biasa bisa.

Thanks,

Zainal



--
Basirudin Rachman

thomas 'znal' ramdhan

unread,
Oct 11, 2009, 4:24:31 AM10/11/09
to bin...@googlegroups.com
class KGRules
    {
        public string RuleType { get; set; }
        public int SeqID { get; set; }
        public int RuleID { get; set; }
        public string RuleDesc { get; set; }
    }

saya cek lagi ke namespacenya, udah satu namespace sih mas basir ama class utamanya

Basirudin Rachman

unread,
Oct 11, 2009, 7:12:21 AM10/11/09
to bin...@googlegroups.com
Konfirmasi KGRules ini public ya?

Basirudin Rachman

thomas 'znal' ramdhan

unread,
Oct 11, 2009, 7:18:46 AM10/11/09
to bin...@googlegroups.com
iya public mas, ketinggalan :">
kalau di windows project sih ga keluar error seperti itu, kalau di project class library aja baru keluar error itu.
Saya taruh propertynya itu di class berbeda sih, jadi property KGRules ga ada di class KGCausative, saya kumpulin di class property sendiri

Basirudin Rachman

unread,
Oct 11, 2009, 7:20:40 AM10/11/09
to bin...@googlegroups.com
Maksudnya property seperti ini?

public KGRules{

 get; set;

}

2009/10/11 thomas 'znal' ramdhan <thomas...@gmail.com>


--
Basirudin Rachman

thomas 'znal' ramdhan

unread,
Oct 11, 2009, 7:35:28 AM10/11/09
to bin...@googlegroups.com
iya seperti itu mas

2009/10/11 Basirudin Rachman <basi...@gmail.com>

Basirudin Rachman

unread,
Oct 11, 2009, 7:36:52 AM10/11/09
to bin...@googlegroups.com
Saya curiga ada salah satu accessor yang entah itu internal atau private pada library nya.

Coba dicek lagi.
Basirudin Rachman
Reply all
Reply to author
Forward
0 new messages