1. Struct與類的區別:(1)結構是實值型別,不是參考型別。(2)結構可以繼續介面,但是不可以繼承類或結構。(3)結構的構造方法的工作方式有所不同,只能聲明帶參數的構造方法,且不能聲明析構方法。(4)可以指定欄位如何在記憶體中布局。 (5) 使用。如下兩種方法都可以。但是切記:方法一的話,"Users user;" 並沒有調用建構函式初始化成員變數!!所以,總起來講,還是方法二好!以下為MSDN words:The struct type is suitable for
Configure to make a app run against the same dotNet FrameworkFor every app, if it has assemblies that are built based on dotNet framework, then it can have a app.exe.config file to support a application level configuration for its running behavior.
1. AnyCPUFirstly, there are 32bit/64bit CLR. For executables, it's up to the CPU bit to decide whether it will load as a 32/64bit process with corresponding CLR; for assembly, it's up to the process it's to be loaded into NOT the CPU or OS bit.
We are developing a app called Fusion. It's a strange app, as: it's a MFC app while internally MFC app is just its clothes and it makes use of C++/CLI and mainly C# assemblies to do the real job. Its startup mechanism can be summarized as:1. Firstly,
1. For a native C++ project in VS, once you create resource.h + res file in the project, you can manually add resources (forget about the stupid resource editor!). By default, the resources will be embedded into the module. Usually, we create
We are so used to adding dotNet module references and project references, but rarely meet situations requiring adding other dotnet module directly. The Other dotnet module consists of 3 kinds: --precondition of installing my app. Like installing
1. Log File is important. I didn't realize its importance until I met a issue that was only reproducible on QA machine and it's hard for me to figure out the reason. I added some code in my project to output some check point status into a log file
MSDN Returns a string array containing the command-line arguments for the current process. Input at the command lineResulting command line argumentsMyApp alpha betaMyApp, alpha, betaMyApp "alpha with spaces" "beta with spaces"MyApp, alpha with
As I am going to do cross-platform development, I can only see this is a prethinking based on my observation to other such teams.1. You still need to work on Windows in major time if you are familiar with windows in long time. Of course, if you have
Some times we could want to print the debug messages to a window (console or windows) or a file, we debug our programms with these information. There's a better way to debug programm, print the message to output window if you use VS, and you can
dotNet Assembly basic (a overall topic Assemblies and the Global Assembly Cache can be found in MSDN)Assemblies have the following properties:Assemblies are implemented as .exe or .dll files.You can share an assembly between applications by placing
To avoid normal stepIntos, you can just put below text into a reg file and run it:Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\NativeDE\StepOver]"CString StepOut"="CString.\\:\\:.*=NoStepInto""INV_STL