随笔分类 -  Tips

摘要:I met VS IDE TOO SLOW issue for some time. Loading solution and F5 to debug took so long time! Finally I figured out the reason: I put my project source code and 3rd parties onto C: while my VS is liv... 阅读全文
posted @ 2010-05-28 10:26 能巴 阅读(189) 评论(0) 推荐(0)
摘要:1. Can I use typedefs in C#?No, C# has no direct equivalent of the C++ typedef. C# does allow an alias to be specified via the using keyword:but the alias only applies in the file in which it is decla... 阅读全文
posted @ 2010-05-20 12:07 能巴 阅读(338) 评论(0) 推荐(1)
摘要:List<Employee> or EmployeeList? In current versions of C#, to get a strongly-typed collection, you need to define a separate type for that collection. So if you want to expose a collection o... 阅读全文
posted @ 2010-05-20 12:04 能巴 阅读(225) 评论(0) 推荐(1)
摘要:Q: 比如SuperMan: IFlyable. 在superMan class中,我们要实现IFlyable的接口函数。如何快速生成所有需要实现的接口函数,在SuperMan中?就是说如何瞬间添加: #region IFlyable implementation. public void func1() {} public void func2() {} #regionA: 1. 在要实现的i... 阅读全文
posted @ 2010-05-17 13:38 能巴 阅读(155) 评论(0) 推荐(0)
摘要:The Regulator is an advanced, free regular expressions testing and learning tool. It allows you to build and verify a regular expression against any text input, file or web, and displays matching, sp... 阅读全文
posted @ 2010-05-16 21:41 能巴 阅读(167) 评论(0) 推荐(0)
摘要:1. Search with Regular Expression (MSDN Ref)2. Code SnippetThere are two types in VS: Expansion and Surround With. "Expansion": type the words + TWO tab. "Surround With" (most useful is #region): sele... 阅读全文
posted @ 2010-05-16 21:24 能巴 阅读(176) 评论(0) 推荐(0)
摘要:As we know, for .Net projects, it's obvious and clear to use "Add Reference.." to control project reference / dependency relationship. Do you know about it for C++? (below is extracted from VC++ Team ... 阅读全文
posted @ 2010-05-14 15:38 能巴 阅读(493) 评论(0) 推荐(1)
摘要:As of Release 2009.2 (now in beta), Perforce supports “shelving”. That is, you can cache your modified files on the server, without having to check them in as a versioned change.More, look... 阅读全文
posted @ 2010-05-07 10:13 能巴 阅读(179) 评论(0) 推荐(0)
摘要:Dictionary: For purposes of enumeration, each item in the dictionary is treated as a KeyValuePair<TKey, TValue> structure representing a value and its key. The order in which the items are re... 阅读全文
posted @ 2010-05-06 11:56 能巴 阅读(233) 评论(0) 推荐(0)
摘要:[From MSDN Blog:http://blogs.msdn.com/shawnfa/archive/2004/02/27/81338.aspx] It's interesting to note all the power of the find combo box in the Visual Studio command bar (shortcut is: ctrl + /). It'... 阅读全文
posted @ 2010-05-01 22:37 能巴 阅读(238) 评论(0) 推荐(0)
摘要:Command window is very effective to me Just find! I can visit all commands here like going to callstack, errorlist, breakpoints, etc.With Ctrl + Tab, command window should be enough to visit everythin... 阅读全文
posted @ 2010-04-11 17:20 能巴 阅读(312) 评论(0) 推荐(0)
摘要:#Region is useful to organize code. Some tips to use it:1. Ctrl+K,s to choose #region to insert it for you.2. Right click in the source file (.cs for example), choose outlining submenu, you will find ... 阅读全文
posted @ 2010-04-11 17:18 能巴 阅读(206) 评论(0) 推荐(0)
摘要:Link from Code Project: http://www.codeproject.com/KB/dotnet/VSCPinYourIDE.aspxHow to add VSCP to your IDE We can add the VSCP as a tool in the IDE so it will be very easy to access the VSCP from th... 阅读全文
posted @ 2010-04-09 23:02 能巴 阅读(612) 评论(0) 推荐(0)
摘要:ctrl+TAB: show VS IDE Browser, by which you can get to visit the active file, or active window easily and as a whole. 阅读全文
posted @ 2010-04-06 22:45 能巴 阅读(117) 评论(0) 推荐(0)
摘要:Things declared outside of a class or struct will default to internal (When you define a data type of some kind (class, struct, enum, etc.) you need not specify an access modifier, but be aware that ... 阅读全文
posted @ 2010-04-02 15:52 能巴 阅读(209) 评论(0) 推荐(0)
摘要:As known, To generate a C++ application: seperate obj -> link together to be dll / exe. If deleting the dll / exe, it will only cause linking.It's not true for managed code. Deleting a C# dll / exe... 阅读全文
posted @ 2010-04-01 17:13 能巴 阅读(208) 评论(0) 推荐(0)
摘要:I worked on a task: when user clicks a command in the application, the cursor can be that command specific. Some gains:1. Cursor can only accept cur file with only black-white color. It's really a big... 阅读全文
posted @ 2010-03-30 16:20 能巴 阅读(202) 评论(0) 推荐(0)
摘要:How to create a custom mouse cursor?// create any bitmapBitmap b = new Bitmap( 55, 25 );Graphics g = Graphics.FromImage ( b );// do whatever you wishg.DrawString ( "myText", this.Font, Brushes.Blue, ... 阅读全文
posted @ 2010-03-29 17:53 能巴 阅读(147) 评论(0) 推荐(0)
摘要:Dependency in solutionWhen specifying a dependency relationship in solution under aproject, automatically XX.lib will be added into project setting,although it will not be stored into project file. Wi... 阅读全文
posted @ 2010-03-27 20:35 能巴 阅读(174) 评论(0) 推荐(0)
摘要:How to reuse pch file on another pc?MS doesn't officially announcethat the pch files that are produced on on pc can be reused on anyother pcs. But MS suggests you can use Incredibuild to do this.You w... 阅读全文
posted @ 2010-03-27 20:32 能巴 阅读(719) 评论(0) 推荐(0)