web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

class accessor methods x++

(0) ShareShare
ReportReport
Posted on by 182
Hi,

I think by default class is internal (if we don't define it like code below) and variables are protected by default
[DataContractAttribute]
class CustContract
{
    AccountNum         custAccount;

    [DataMember("custAccount")]
    public AccountNum parmCustAccount(AccountNum _custAccount = custAccount)
    {
        custAccount= _custAccount;
        return custAccount;
    }
}

So for custom services:

1. Is it better to make class public instead?
2. Is it better make variables private instead of protected?
3. For the data member name, is it better to make it capital letter or small letter? i mean custAccount or CustAccount?  i think maybe small letter to match json style?
Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 660

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 654 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 489

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans