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 8736557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:19:47+00:00 2026-06-13T10:19:47+00:00

In c# I can do: object foo = null; How do I do this

  • 0

In c# I can do:

object foo = null;

How do I do this in object script?

  • 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-13T10:19:48+00:00Added an answer on June 13, 2026 at 10:19 am

    For simple variables, there isn’t a way to set a variable to have an undefined value. Since Cache Object Script has loose typing, it isn’t necessary to set an object reference to NULL, it is enough to change the value of the reference to anything else, most commonly empty string, and the garbage collector will clean up the objects for which there is no active reference.

    For all practical purposes, setting that variable to empty string “”, is enough. If not, can you expand on your question?

    Object properties in Cache Object Script never resolve to an undefined value. If the value is undefined (because it has the SQL value of NULL or has never been assigned a value), then the property will resolve to the value of empty string. If you want the property to contain the SQL representation of null, you can do an SQL Insert or Update on the row that corresponds to that object and set the field to NULL. If you set the object’s property to empty string and save it, the SQL row for that object will not have NULL, but will have empty string.

    Basically, there isn’t really an abstract representation of NULL in the object view. There are serialized values for SQL NULL that resolve to NULL in the SQL view and empty string in the Objects view.

    Incidentally, the serialized value of NULL in the SQL view is empty string, and the serialized value of empty string is ASCII 0.

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

Sidebar

Related Questions

I'm stringyfing an object like {'foo': 'bar'} How can I turn the string back
Can Automapper map values from a NameValueCollection onto an object, where target.Foo receives the
Let us say my domain object can contain a bunch of objects like this:
I see a lot of people doing this Object.prototype.foo = 'HALLO'; var hash =
a) Can Object.GetType also be used for late binding ( Book I’m reading says
As far as I know, in Java I can Object o = new String(abc)
Can the object value be looked up and passed to the generic view? Would
In prototypal languages object can basically clone each other. So, lets say we have
In android I can Log(aa,+Object) ,then the object can as string to print,it can
What is maximum size of data that an object can hold on the iPhone?

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.