|
Παρουσίαση με Ετικέτες
Όλες οι Ετικέτε... » c# » programming » Posts (RSS)
-
Just came across the following case in C# that puzzled me momentarily, especially since the strings involved were long enough and the expression was broken on multiple lines: bool flag = true; string test1 = flag? "xa" : "xb"; string test2 = "x" + (flag? "a" : "b"); string test3 = "x" + flag? ...
-
My comment at: http://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/4272089-support-implicit-interfaces-for-code-reuse It would be nice indeed if one could define at the client object’s side a static interface that is a subset of the methods of a server (or serving if you prefer) object (it is only the view of the ...
-
It is rather unfortunate that C# doesn’t support constants in interfaces, whereas Java does. If IL (intermediate language) that C# usually compiles to (when not using AOT that is like in .NET Native or Xamarin iOS) doesn’t support this, then the compiler could create a special sealed class to carry the constants. Then, wherever ...
-
It would be nice if one could rewrite this C# snippet: public SortedDictionary<string, UObject> GetObjects() { SortedDictionary<string, UObject> result = new SortedDictionary<string, UObject>(); using (ReadTransaction xact = namingSchema.ReadTransaction()) foreach (ObjectName.RowType row in ...
-
This is a suggestion I’ve just sent in via Visual Studio’s “Send a frown” feature: Instead of writing statements like: List<CultureInfo> result = new List<CultureInfo>(); in C# I’d prefer to be able to write List<CultureInfo> result = new (); inside the () one would be able to pass contructor parameters ...
|
|
|