Questions tagged [automatic-properties]
219 questions
0
votes
1 answer
Binding a dictionary as datasource to a combobox
today I'm having a strange problem with binding a datasource to a dictioary with a autoproperty.
IDE: Visual Studio 2015
Language: C#
Usage: Windows Forms Application
I have created a dictionary with a Auto property as value:
Dictionary:
///…

kami
- 244
- 1
- 3
- 16
0
votes
1 answer
Property that can rearrange components when I am changing size of windows applications
Are there any property of a form or a component by which components of windows applications created using Visual Studio will be arranged automatically when I changed the windows size or maximized - restored the window? If not, How can I do it…

chanchal1987
- 2,320
- 7
- 31
- 64
0
votes
1 answer
SVN, where is config file for setting repository properties?
I have been researching how to set server side properties for svn repository. As described here, you can set repository to have something like this:
svn:auto-props = '*.init.xml = svn:needs-lock'
The thing is, I found config file to do it for every…

Arsen Simonean
- 362
- 2
- 17
0
votes
3 answers
MATLAB how to automatically read a number of files
I would like to plot a number of 3D graphs from different data files. For example I am using
fid = fopen('SS 1.dat','r');
to read the first file and then plot a graph. How to set the program to change the name to 'SS 2.dat' automatically? Also…

Kelvin S
- 341
- 2
- 4
- 13
0
votes
5 answers
Automatic properties
I want to know that when you create an Automatic property
and invoke the set in the main() method for a random value , where is that value being stored ?as in this example :
class Program
{
static void Main(string[] args)
…
user4702921
0
votes
0 answers
Visual Studio 2015 replaces private property with public property
When i have a private field in c#, let's say private string a, which is used in the constructor like this:
a = "1";
Console.WriteLine(a);
and i create a public property via: Ctrl + R + E
Visual Studio 2015 automtically replaces all private fields…

BendEg
- 20,098
- 17
- 57
- 131
0
votes
1 answer
It is possible to use auto-properties and have some logic in the set?
It is possible to use auto-properties and have some logic in the set?
public bool IsAwesome
{
get;
private set
{
?? = value;
onIsAwesomeChanged();
}
}

AXMIM
- 2,424
- 1
- 20
- 38
0
votes
2 answers
How to take advantage of an auto-property when refactoring this .Net 1.1 sample?
I see a lot of legacy .Net 1.1-style code at work like in example below, which I would like to shrink with the help of an auto-property. This will help many classes shrink by 30-40%, which I think would be good.
public int MyIntThingy
{
get
…

Hamish Grubijan
- 10,562
- 23
- 99
- 147
0
votes
1 answer
Tableau automatic parameter / calculated field
I am very new to Tableau, and I am strugling a bit. I have a data set of measurements from an automated process looking similar to this:
| UNC with intial data | ... | Measurement Start | UNC with data with headers | Invalid row in the end|
UNC :…

Hertel89
- 23
- 1
- 8
0
votes
1 answer
Is Get; Set property syntaxes makes any difference?
I am new to C# language. There are different syntax for Get; Set property. Like
public string Name
{
get
{
return this.name;
}
set
{
this.name = value;
}
}
public string Name
{
get { return…

Muzamil Rafique
- 147
- 1
- 12
0
votes
2 answers
Automatic box heights
I have a php site with a while loop, that reads out a database. For example it reads out: name,category etc..After it has read out all parameters it puts the values in a box (like in windows or such things). This box is a Div.
Now my porblem…

Phigy
- 25
- 5
0
votes
1 answer
How to change the default value of a property?
In the past we declared classes and can change the default value of a property like this:
public class MyClass
{
private string name;
public string Name
{
get{ if(name==null) return ""; }
set{ name= value; }
…

Lyly
- 718
- 1
- 8
- 17
0
votes
2 answers
Implementing Disposable pattern correctly - auto-implemented properties
One of the rules for implementing the Dispose method says:
Throw an ObjectDisposedException from instance methods on this type (other than Dispose) when resources are already disposed. This rule does not apply to the Dispose method because it…

Michal
- 119
- 2
- 9
0
votes
1 answer
FPDF image size
I'm using FPDF with PHP to add an image to a PDF and I want to put automatically the size of the image I find this function
function fctaffichimage($img_Src, $W_max, $H_max) {
if (file_exists($img_Src)) {
$img_size =…

french student
- 1
- 1
- 2
0
votes
1 answer
Accessing the index operator of an auto-property struct
I've got a "Vector" struct which stores a x, y, and z values. In an effort to make them easier to access I added an index operator, like this:
public struct Vector
{
public double x;
public double y;
public double z;
public double…

9a3eedi
- 696
- 2
- 7
- 18