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

  • Home
  • SEARCH
  • 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 8616219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:33:56+00:00 2026-06-12T05:33:56+00:00

private byte[] ObjectToByteArray(Object obj) { if (obj == null) return null; BinaryFormatter bf =

  • 0
    private byte[] ObjectToByteArray(Object obj)
    {
        if (obj == null)
            return null;
        BinaryFormatter bf = new BinaryFormatter();
        MemoryStream ms = new MemoryStream();
        bf.Serialize(ms, obj);
        return ms.ToArray();
    }


    private Object ByteArrayToObject(byte[] arrBytes)
    {
        MemoryStream memStream = new MemoryStream();
        BinaryFormatter binForm = new BinaryFormatter();
        memStream.Write(arrBytes, 0, arrBytes.Length);
        memStream.Seek(0, SeekOrigin.Begin);
        Object obj = (Object)binForm.Deserialize(memStream);
        return obj;
    }

i can’t do that process in silverligth, didn’t define “BinaryFormatter” class.

  • 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-12T05:33:58+00:00Added an answer on June 12, 2026 at 5:33 am

    There is no such class as BinaryFormatter nor SoapFormatter for Silverlight, but you can use the DataContractJsonSerializer that is supported in Silverlight.

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

Sidebar

Related Questions

I used private BitmapImage byteArrayToImage(byte[] byteArrayIn) { try { MemoryStream stream = new MemoryStream();
/// <summary></summary> private Byte[] _ReceiveBytes(Int32 size) { MemoryStream memory = null; SocketAsyncEventArgs args =
I am using the BinaryFormatter and a MemoryStream to serialize an object and then
I am trying to serialize some Linq objects using this code. private byte[] GetSerializedObj(object
I'm trying to serialize/deserialize string. Using the code: private byte[] StrToBytes(string str) { BinaryFormatter
I got next code: private Dictionary<int?, byte[]> GetAllLocalScanFiles() { using (DZine_IStylingEntities ctxLocal = new
private TextBox txtBoxDragPoint = new TextBox(); private void rtbLogicCode_MouseDown(object sender, MouseEventArgs e) { if
Given private int width = 400; private byte [] data = new byte [2];
following is my code: private byte[] downloadImage(String image_url) { byte[] image_blob = null; URL
private byte[] loadClassData(String className) { ZipInputStream in = null; FileInputStream fis = null; try

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.