hc
2024-11-01 a01b5c9f91adaee088a817861603a5dbe14775c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 85bf9cd32138539252ed01c355cf766612cf47c9 Mon Sep 17 00:00:00 2001
From: Paul Cercueil <paul@crapouillou.net>
Date: Thu, 2 Sep 2021 11:04:21 +0100
Subject: [PATCH] C#: public fields with getters/setters cannot be marked
 readonly
 
MSVC would fail with the following error:
error CS0106: The modifier 'readonly' is not valid for this item
 
Reported-by: Raluca Chis <raluca.chis@analog.com>
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
 
[Retrieved from:
https://github.com/analogdevicesinc/libiio/commit/85bf9cd32138539252ed01c355cf766612cf47c9]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 bindings/csharp/Device.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 
diff --git a/bindings/csharp/Device.cs b/bindings/csharp/Device.cs
index 96214243f..6c8c8f4f3 100644
--- a/bindings/csharp/Device.cs
+++ b/bindings/csharp/Device.cs
@@ -208,7 +208,7 @@ public override void write(string str)
         public readonly string name;
 
         /// <summary>The label of this device.</summary>
-        public readonly string label { get; private set; }
+        public string label { get; private set; }
 
         /// <summary>A <c>list</c> of all the attributes that this device has.</summary>
         public readonly List<Attr> attrs;