Tags » Narain

WPF MVVM Datagrid Save User-Defined Column Order

Can anyone point me to a solution where i can save the column sort order of a wpf-datagrid in a mvvm scenario? Most solutions i have found so far are mostly utilizing some sort of code-behind logic. 13 more words


Extract a string from all lines in a file

I want to extract a string which has a unique prefix from all lines in a file.
Though I am bad at string manipulations and regular expressions, I tried to use sed, cut commands but failed to extract the string. 76 more words


Is it a good coding standard to #define functions

Is it a good coding practice to #define functions with same name.
For example,

    #define function1(a) function1(a, b)
    static int b = some value. //b can be any datatype. 61 more words