473,385 Members | 1,384 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Error 1 Inconsistent accessibility: field type 'Class0.Struct0' is less accessible th

Anyone can help me? Its happening for all 3 structs(struct0, struct1, and struct2)

using System;
using System.Runtime.InteropServices;

internal sealed class Class0
{
internal static int int_0; // data size: 4 bytes
internal static int int_1; // data size: 4 bytes
internal static int int_2; // data size: 4 bytes
internal static int int_3; // data size: 4 bytes
internal static Struct0 struct0_0; // data size: 32 bytes
internal static Struct1 struct1_0; // data size: 256 bytes
internal static Struct2 struct2_0; // data size: 16 bytes

[StructLayout(LayoutKind.Explicit, Size=0x20, Pack=1)]
private struct Struct0
{
}

[StructLayout(LayoutKind.Explicit, Size=0x100, Pack=1)]
private struct Struct1
{
}

[StructLayout(LayoutKind.Explicit, Size=0x10, Pack=1)]
private struct Struct2
{
}
}
Feb 3 '12 #1
1 2852
Joseph Martell
198 Expert 128KB
This means that you need to modify the accessibility level of either Class0 to make it "private" or modify the structs to be "internal".

Essentially this error is telling you that with your current accessibility modifiers it is possible to write code that could access Class0 but would not be allowed to access any of your structs, which doesn't really make sense. Your contained types (Struct0, Struct1, and Strucgt2) must be at least as accessible as your containing types (Class0).
Feb 4 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: kingofkolt | last post by:
All, What do you recommend as the best type of field for a timestamp in a MySQL database? I've considered varchar(10) or INT but I'm not sure what is the best, most efficient, and most reliable...
1
by: Galina | last post by:
Hello I am trying to create a table, which includes a field type LONG. The wizard hasn't allowed me to enter storage settings for this table. It set the initial size is 64K and not available to...
7
by: Galina | last post by:
Hello I am going to copy a data from MS Access table into Oracle table. One of fields is memo type and data in this field range from 1 character to 551 long string. Do I need to create a field...
2
by: William Gill | last post by:
When I designed my db in several tables I used unsigned integer fields to hold an integer that each bit was a 'flag'. Now I realize that the set field type does just what I was trying to...
7
by: Együd Csaba | last post by:
Hi, I've a problem with some of my stored procs. My config is: RH7.1, Postgres 7.3.2 I had converted a few fields of a few tables from one type to another and after this I made all the...
4
by: Andreas Meffert | last post by:
Hello, How can I change the Type of a field in a table from Memo to hyperlink? I import a table from Oracle to Access 2003. After that, the field type of some hyperlink-fields is "Memo". How...
6
by: MLH | last post by:
I have this little snippet running whenever I want to list my table field names in the debug window, along with their field types... For i = 0 To TempRecordset.Fields.Count - 1 Debug.Print...
1
by: Henry Stockbridge | last post by:
I am doing some database documentation, and need to convert the field type and field formats in my code into terms I can convey to others (i.e. Date/Short Date, Number/Double, and so forth.) Any...
17
by: The Frog | last post by:
Hello everyone, I am working on an application that can build database objects in MS Access from text files. I suppose you could call it a backup and restore type routine. Accessing the...
1
by: bachyen | last post by:
I have the following code, but it is error when I build it. Can you help me? Can you tell me more about 'Inconsistent accessibility: return type', 'Inconsistent accessibility: parameter type'. ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.