|
Παρουσίαση με Ετικέτες
Όλες οι Ετικέτε... » Posts » Programming (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 ...
-
Have again suggested this long before to Visual Studio team, but since Visual Studio 2013 has a “Send a Frown” feature, I’ve sent it again with some suggestions on how it could be implemented. I need some clever replace in cases like that one shown in the screenshot below, where I have the implementation of […]
-
Recently, to save myself sometime after having renamed some interfaces/classes in the ClipFlair project sourcecode, I right-clicked one of the class diagrams (.cd files) in it at Visual Studio’s “Solution Navigator” (this is an enhanced Solution Explorer addon) and using “Open With…” I opened up the diagrams with the XML editor to do a rename-all ...
-
Project Linker is a Visual Studio Extension that “helps to automatically create and maintain links from a source project to a target project to share code that is common to Silverlight and WPF”. In ClipFlair, where I have shared code between a Silverlight and a WPF project (I guess same would be for XNA projects [...]
-
A big nuissance in Windows Live Writer is that when you try to type in a double-quote character you get some special Unicode character (“ or ”, at the start and end of a string respectively), other than the classic ASCII character used in programming. That way people copy-pasting snippets from your blog can get [...]
-
During the development of ClipFlair (currently at Alpha1-internal version), I’ve been doing lots of research, hunting for information (documentation, related discussion threads, useful download links) needed when writing and refactoring source code etc. I have tried to organize these links as (Windows) Internet shortcut files into folders. They do ...
-
Just got bitten by the following: Dim takeN As Integer = If(Integer.TryParse(EdTake.Text, takeN), takeN, itemsCount) I had used that instead of writing in 2 lines: Dim takeN As Integer If not Integer.TryParse(EdTake.Text, takeN) then takeN = itemsCount However, there’s an important difference: “If” is a function, so its arguments are evaluated at ...
|
|
|