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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:28:07+00:00 2026-06-10T11:28:07+00:00

I am currently working with spring.net for dependency injection on a .net project c#.

  • 0

I am currently working with spring.net for dependency injection on a .net project c#. I am configuring my spring via xml configuration files. In this I am creating my objects etc.

I would like to create a constant object, with string value within my xml file. Is this possible and if so, how might I achieve this? I want to proceed and use this value in multiple places, hence I am taking this approach.

  • 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-10T11:28:08+00:00Added an answer on June 10, 2026 at 11:28 am

    MyString is singleton, because of spring objects are singleton by default

    <object id="MyString" type="System.String" factory-method="Copy">
      <constructor-arg index="0">
        <value>SomeStringValue</value>
      </constructor-arg>
    </object>
    

    Here is how to reference MyString:

    <object id="SomeObj" type="ExampleSpring.SomeObj, ExampleSpring">
      <property name="Str" ref="MyString" />
    </object>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently working on a WPF/.Net project, In this project the user has
I am currently working on an ASP.NET MVC2 project. This is the first time
I'm working on a project which currently uses NHibernate 2.1.2, FluentNHibernate 1.1 and Spring.Net
Im currently working on a grizzly, spring and jersey project and i have encountered:
I'm currently working on an ASP.NET 3.5 project, and I wanted to know your
I'm, currently working my first project in .NET 4.0 and it requires several thousand
I am currently working on a ASP.NET MVC 3 project in which I have
I am currently working on a ASP.NET MVC 3 project in which I need
I'm currently working on an ASP.NET project where I'm using the Google Maps API
Currently I am working on an ASP.net webforms project where I would like to

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.