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

The Archive Base Latest Questions

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

I want to generate aliases for properties in generated code. All I could do

  • 0

I want to generate aliases for properties in generated code. All I could do so far was:

partial class Purchase
{
    public User Customer
    {
        get
        {
            return this.User;
        }

        set
        {
            this.User = value;
        }
    }
}

I wonder if there is any other way to define an alias in C#. The Purchase class was generated by Linq-to-SQL

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

    No, it’s not possible to do in C#. Property name is single identifier you can define for it.

    Don’t know if this is what you’re searching for or not:

    but you can define (say) a Dictionary<string,object> where Key is a propertyname and value is a value of the property. In this way you can define dynamic property cash, with changing property names and values at runtime.

    or can use an ExpandoObject , if you use C# 4.0

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

Sidebar

Related Questions

I want to generate a list of all methods in a class or in
Let's say I have a class of 30 students and want generate every possible
I want to generate a choicelist for all specs that inherit from imagekit.specs.ImageSpec .
I want to generate a classpath automatically with all the *.jar files contained under
I want to generate geoJson data for an country and its all the states.
I want to generate facelets code from UIComponent, Eg: org.primefaces.component.commandbutton.CommandButton; CommandButton btn=new CommandButton(); btn.setValue(Click);
I want to generate a QR Code in a Job or Winforms app. My
I want to generate some data for editing, filtered by the choice a user
I want to generate customer ids for invoices and thus don't want to start
I want to generate some html code for the jsf page I have (I

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.