Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7979139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:41:40+00:00 2026-06-04T09:41:40+00:00

I am building a project that has both Android and iOS clients with MonoTouch

  • 0

I am building a project that has both Android and iOS clients with MonoTouch and MonoDroid. A common business layer project contains common domain entities.

One of them has a need to store an Image, Name and Age. The image is not downloaded.

Is it possible to create a common object that holds the actual data for a PNG or JPG but that is somehow workable in both iOS and Android?

///Simplified customer
class Customer {
   public Image???;
   public string Name;
   public Int Age;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T09:41:42+00:00Added an answer on June 4, 2026 at 9:41 am

    Options:

    1. represent Image as byte[] or MemoryStream/Stream
    2. stay with native platform specific code requires partial classes and linking
      common class in Customer.cs – linked through projects I call this approach split-n-link
      or link-n-split

      public partial class Customer {
      public string Name;
      public Int Age;
      }

    delta class for monotouch in monotouch project

    public partial class Customer {
        public UIImage;
    }
    

    delta class for mono for android in m4a project

    public partial class Customer {
        public ImageView;
    }
    

    So, each project will contain Customer.cs One original/source and other link to it, which one depends on preferences or common-feature-denominator if dealing with Windows Phone (currently it has smallest set of features – better it is more restrictive).
    Besides main/original/source Customer.cs file, there are 2 (3 if WP) deltas with platform
    specific stuff. Remember partial classes are “additive” meaning You can add Attributes in different cs file and they apply, so in this delta class one can add platform specific Attributes and enable stuff like binding for iOS ad/or Android if needed. From Holisticware experience (Visual Studio centric 80%+, 20% or less on Mac) source project is Mono for Android, but it could be reverse…

    With link-n-spilt one ends up basically with POCO + delta and this POCO can be used for targeting desktop platform (WF, WPF) where everything is easier: debugging, unit testing, etc.

    And there is advantage that each project is compiled/build with configuration for that platform – so ig guys from Xamarin come up with some other bright idea for builds like size optimizations this should not affect projects – recompile and go!

    HTH
    mel

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a C# solution in Visual Studio 2008 that has several projects
I have an ARM project that I'm building with make. I'm creating the list
I'm currently working on a project that is building a java-based desktop application to
I'm going to start a new project that's building web apps from scratch. I
Currently I have a simple maven project that is building a jar file and
I'm building an application that contains a bunch of projects that are at various
I'm building a rather large project, that basically consists of this: Server 1: Ice
I have an app that I'm building with XCode 4.2. It has push, and
I have a website project. It has assembly references to external DLLs that we
i'm currently developing an app for both Android and iOS, thing is... I started

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.