Καλώς ορίσατε στο dotNETZone.gr - Σύνδεση | Εγγραφή | Βοήθεια
σε

 

Αρχική σελίδα Ιστολόγια Συζητήσεις Εκθέσεις Φωτογραφιών Αρχειοθήκες

Παρουσίαση με Ετικέτες

Όλες οι Ετικέτε... » Programming » Posts   (RSS)
  • Gotcha: use parentheses around ternary op conditional expressions

    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? ...
    Δημοσιεύτηκε στο George Birbilis' blog (Weblog) από το μέλος birbilis στις Αυγούστου 25, 2018
  • Suggestion: on Duck Typing and C#/.NET

    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 ...
    Δημοσιεύτηκε στο George Birbilis' blog (Weblog) από το μέλος birbilis στις Νοεμβρίου 16, 2015
  • Suggestion: Add support for constants in C# (and VB.net etc.) interfaces

    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 ...
    Δημοσιεύτηκε στο George Birbilis' blog (Weblog) από το μέλος birbilis στις Νοεμβρίου 16, 2015
  • Suggestion: Define once and reuse result type of method inside its body

    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 ...
    Δημοσιεύτηκε στο George Birbilis' blog (Weblog) από το μέλος birbilis στις Νοεμβρίου 10, 2015
  • Suggestion: Allow new in C# without giving Type

    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 ...
    Δημοσιεύτηκε στο George Birbilis' blog (Weblog) από το μέλος birbilis στις Αυγούστου 23, 2015
  • Suggestion: Case adaptive text replacement in Visual Studio editor

    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 […]
    Δημοσιεύτηκε στο George Birbilis' blog (Weblog) από το μέλος birbilis στις Μαρτίου 16, 2015
  • Fix: Visual Studio opens class diagram in XML editor with double click

    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 ...
    Δημοσιεύτηκε στο George Birbilis' blog (Weblog) από το μέλος birbilis στις Φεβρουαρίου 10, 2013
  • HowTo: Make Project Linker extension’s VSIX install at Visual Studio 2012

    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 [...]
    Δημοσιεύτηκε στο George Birbilis' blog (Weblog) από το μέλος birbilis στις Νοεμβρίου 27, 2012
  • HowTo: Type in double-quote in Windows Live Writer

    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 [...]
    Δημοσιεύτηκε στο George Birbilis' blog (Weblog) από το μέλος birbilis στις Αυγούστου 14, 2012
  • Collection of useful links for .NET, Silverlight, WPF etc. development

    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 ...
    Δημοσιεύτηκε στο George Birbilis' blog (Weblog) από το μέλος birbilis στις Ιουλίου 5, 2012
  • VB gotcha: when If function isn’t equivalent to an If-Then-Else block

    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 ...
    Δημοσιεύτηκε στο George Birbilis' blog (Weblog) από το μέλος birbilis στις Νοεμβρίου 25, 2011
Με χρήση του Community Server (Commercial Edition), από την Telligent Systems