Replace "magic" strings in Cursors.cs with const strings declared at top of file
See original GitHub issueactual:
public static Cursor HSplit {
get {
if (hSplit == null)
hSplit = new Cursor("hsplit.cur", 0);
return hSplit;
}
}
expected:
internal const string HSPLIT_CUR = "hsplit.cur"
// ...
public static Cursor HSplit {
get {
if (hSplit == null)
hSplit = new Cursor(HSPLIT_CUR , 0);
return hSplit;
}
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
anti patterns - What is wrong with magic strings?
If a magic string is being written in multiple places you have to change all of them without any safety (such as compile-time...
Read more >Use system cursors in System.Windows.Forms.Cursors #140
Cursors has a few embedded cursors that where added for backwards ... Replace "magic" strings in Cursors.cs with const strings declared at ...
Read more >Using magic strings or constants in processing punctuation?
A space is always going to be a space, and it's just more natural to read (and write!): s.replace("String", " ");. Than: s.replace("String", ......
Read more >Magic strings or constants?
When used directly as a magic string, value can be confused with something else, especially in large-scale applications, whereas const indicates ...
Read more >Replacement for #define with magic numbers : r/rust
I am coming from C. I know in general magic numbers are bad, ... Why can't rust just to string Replacement before compilation?...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @karelz. I discussed this with @zsd4yr , we hit a race condition opening these 2 issues. Indeed #140 is the preferred way to implement this - we will get all OS improvements(high res and the right system theme) when we access the system cursors 😃 and will reduce size of our binary somewhat.
Thanks!