473,566 Members | 2,785 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Transfer Objects and Business Objects, Inconsistent Accessibility

1 New Member
Hello,

I'm building a POC architecture framework, in which I have my business objects (BOs) made of internal classes and my transfer objects (TOs) made of public classes.
what I'd like to do is have a constructor for each TO and use the BO as a parameter, so to build the TO using the BO
what I coded is this

Expand|Select|Wrap|Line Numbers
  1. public class ClientTO {
  2.   public string name;
  3.  
  4.   public ClientTO (ClientBO client)  {
  5.     this.name = client.name;
  6.   }
  7. }
The problem is that ClientBO is internal and ClientTO is public, so it gives a compilation error "inconsiste nt accessibility: parameter type ClientBO is less accessible than method ClientTO(Client BO)"

any ideas? I don't to make my BOs public so to force programmers to use TOs

thanks in advance,
mariano
Feb 28 '07 #1
0 988

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

Similar topics

1
68007
by: Sunit Joshi | last post by:
I get this message "Inconsistent accessibility: return type 'TimeTracker.TrackerObjects.Project' is less accessible than method 'TimeTracker.TrackerObjects.GetProject(int)'" Here's the code namespace TimeTracker { public class TrackerObjects { private static Project aProject=null;
10
12176
by: GreggTB | last post by:
I've got an page (LOGIN.ASPX) that receives the user's login information. During the page load, it checks the credentials against a database and, if validation is successful, creates an instance of an object that stores the user's basic profile data (username, user type, associated sales region, etc.). I've been taking this user info and...
5
27244
by: Andy Fish | last post by:
Consider the following code fragment public class Wrapper { protected enum E { IN, OUT }; public class C { protected void foo(E e) { } } } I want the class C to be accessible from outside the wrapper class, but not
3
37059
by: AAV | last post by:
what is wrong with the code i get 'Error 1 Inconsistent accessibility: parameter type 'ConsoleApplication1.Garage.CarDelegate' is less accessible than method 'ConsoleApplication1.Car.process(ConsoleApplication1.Garage.CarDelegate) ' E:\VS2005_Study\Delegates.cs 49 23 ConsoleApplication1 ' using System;
27
2530
by: SasQ | last post by:
Hello. I wonder if literal constants are objects, or they're only "naked" values not contained in any object? I have read that literal constants may not to be allocated by the compiler. If the Standard is saying that "object is a region of storage", I deduce from that that literal constants aren't objects because they may not be alocated...
3
4409
by: WillyL | last post by:
I keep getting the following error message: Inconsistent accessibility: return type 'System.Collections.Generic.IEnumerable<Iteraties.Aandeel>' is less accessible than method 'Iteraties.AandeelPortefeuille.GetEnumerator()' I have the following code: using System; using System.Collections; using System.Collections.Generic;
1
3224
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'. using System; public class Tinh_khoang_cach_Ham_tu_dinh_nghia { struct DIEM { public Double x;
3
3209
by: EvilProject | last post by:
While working on a scripting engine I Encountered the following problem. First I Created an abstract base class EPType that represent a variable type in the script. internal abstract class EPType { private String m_Name; public String Name { get { return m_Name; } }
9
5140
by: dylan.miller | last post by:
I'm having trouble understanding the internal access modifier. There are many classes in my assembly that should not be accessible outside of the assembly. I've used the internal access modifier for these classes. I have public classes that use the internal classes, but I get a CS0051 error if I use an internal class as a parameter to a...
0
7666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
1
7644
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.