Skip to main content

Questions tagged [automatic-properties]

The tag has no usage guidance.

automatic-properties
0 votes
0 answers
42 views

.NET 8 not inline read-only auto-properties

I'm checking the Disassembly Window, when running a long test, with a warming phase, that uses swaps, swap legs and coupons. The test runs the valuation code a number enough of times for PGO to kick ...
Ian Marteens's user avatar
0 votes
0 answers
162 views

Identification of automatically generated move assignment operator

What is the automatically generated move assignment operator for a class Number that contains only one attribute of type std::shared_ptr<Vertex>? #include <iostream> #include <memory>...
GRamon's user avatar
  • 77
0 votes
0 answers
70 views

How would I invoke setter when modifying properties in C#?

Suppose I have a class Character, which have stats of the class Stat. Specifically each character has a Character.Speed Stat that can be modified. This speed stat is heavily related to a float ...
Lnio Yarschov's user avatar
-1 votes
1 answer
82 views

Assign macro to shape, stop automatic updating [closed]

In Excel, I have a dropdown list in cell C6. A user then inputs a numerical value into cell C10. I then have 4 dependent cells (dependent on cells C6, and the value inputted into cell C10), in C13, ...
user22168531's user avatar
0 votes
2 answers
101 views

Automatically update cells

I currently have this code for my worksheet: Private Sub Worksheet_Change(ByVal Target As Range) ' ensure events are always enabled when we exit this Sub, even if we have an error On Error ...
user22168531's user avatar
2 votes
1 answer
340 views

Config.GetSection<T> with invalid class property names

Using IConfigurationRoot extension method public static T GetSectionAsObject<T>(this IConfigurationRoot configuration, string key) { return configuration.GetSection(key).Get<T>(); } I ...
chuftica's user avatar
  • 177
0 votes
0 answers
27 views

A method to use a formula if , and if not to tip a value manual inside, without VBA Excel

Hello and thanks for the help in advance. Is there a way, for example, if cell A1 can say either yes or no, then I say in cell A2, if it says yes, then automatically write a word like "tree" ...
xaraj yawell's user avatar
1 vote
3 answers
3k views

Can I define a custom getter for a C# auto-implemented property (a.k.a. auto backing field)?

Note: I know how to accomplish this without using auto-implemented properties, but I'm wondering if C# has a built-in way to do this. Let's say I have this simple example of an auto-implemented ...
user3163495's user avatar
  • 3,285
-1 votes
1 answer
126 views

Difference between two class definitions in c# [duplicate]

Failing finding an answer I can understand, could someone explain the difference between the following: // One private Guid mCategoryID; public Guid CategoryID { get { return ...
jerrym0rganmotors65's user avatar
-1 votes
1 answer
75 views

automatic timestamp script for each row

I'm looking for a script for google sheet that automatically inserts a timestamp for each row. and the date and time will be updated every time any of the rows gets edited. Timestamp will be put on ...
ashley tago's user avatar
1 vote
1 answer
35 views

Will use 'k_BackingField' cause version compatibility problem?

Recently, I'm working on serialization with C#. I found that the automatic-properties' fields are named "<...>k_BackingField". So my problem is dose this naming rule same in all .Net versions,...
Rick12321's user avatar
1 vote
2 answers
2k views

Custom auto properties in C# [duplicate]

I have the following class with auto properties: class Coordinates { public Coordinates(int x, int y) { X = x * 10; Y = y * 10; } public int X { get; set; } ...
Oiproks's user avatar
  • 784
-1 votes
2 answers
555 views

Object fingerprinting: serialization + untouchable legacy code + Getter-only auto-properties = cornered?

I have found myself cornered, so here we go. Context I need to produce a fingerprint hash code for object diffing. Comparing the hashes of two sets of objects will need to tell me if there are ...
alelom's user avatar
  • 2,690
1 vote
1 answer
432 views

How to automate rename columns of a python Dataframe with the format column name + filename

I have many CSV files and I would like to rename each column of each file. A CSV file has for example a column named "wind" and I would like to transform it automatically to : wind_Dar. (Dar is the ...
JEG's user avatar
  • 154
0 votes
2 answers
572 views

Auto property initialization with anonymous function

I'm trying to get rid of some code with anonymous functions and classes. I stuck on this: public List<Object> Years { get; set; } = GetYears(); private static List<Object> GetYears() { ...
Kamil's user avatar
  • 13.8k

15 30 50 per page
1
2 3 4 5
15