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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:56:35+00:00 2026-05-22T15:56:35+00:00

I once used a code snippet I saw/found in the past that would turn

  • 0

I once used a code snippet I saw/found in the past that would turn my single statement into a private/public getter/setter, I’ve been so far unable to repeat that find since reinstalling my machine.

for example:

private string serverSMTP = string.empty;

I could then press Ctrl k + and turn it into this:

        private string serverSMTP = string.Empty;
    public string ServerSMTP
    {
        get { return serverSMTP; }
        set
        {
            serverSMTP = value;
            RaisePropertyChanged("ServerSMTP");
        }
    }

Any ideas on how I can create something to do that or an extension/snippet to take care of it for me? In larger projects this would save me a lot of time.

  • 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-05-22T15:56:36+00:00Added an answer on May 22, 2026 at 3:56 pm

    If you are already using the MVVM Light framework you can install the code snippets that ship with it that will do something similar. Specifically the “mvvminpc” snippet will do what you are looking for, although it will not take an existing field declaration and convert it to a property with a propertychanged notification.

    http://mvvmlight.codeplex.com/sourcecontrol/latest#Installer/InstallItems/Snippets/CSharp/mvvmInpc.snippet

    Code snippets to speed up the addition of new properties (Visual Studio only):
    mvvminpc adds a new bindable property to a ViewModel.
    mvvmlocatorproperty adds a new ViewModel to a ViewModeLocator.
    mvvmpropa adds a new attached property to a DependencyObject (WPF only).
    mvvmpropdp adds a new dependency property to a DependencyObject (WPF only).
    mvvmslpropa adds a new attached property to a DependencyObject (Silverlight only).
    mvvmslpropdp adds a new dependency property to a DependencyObject (Silverlight only).

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

Sidebar

Related Questions

I commonly place into variables values that are only used once after assignment. I
The following code is being used to disable a Submit button once it has
I used once a very nice emacs function that set all my windows (emacs
I saw something once for wrappers used to do this but it asked for
I'm trying to write a vs code snippet that will take the selected and
Once, there was this awesome SNIPPETS library of C (and C++) code. I used
My defs.php has a define that I need, and although I used require_once for
Once, I used this query to select the number of items in order to
Once I have programmed GUI with Java and have used Form Layouts. Form layout
I succesfully used a validator more than once,but after some programming my validators are

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.