Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts
2017/07/27
2017/07/06
2017/04/16
2016/08/12
2016/07/29
2016/07/26
How to generate C# classes from xml in Visual Studio ?
- Copy xml to clipboard
- Open Visual Studio -> create class file -> remove class definition -> edit menu -> Paste special -> Paste XML As Classes
- Replace typeA[][] to List<TypeA>
2016/07/22
How to change destination folder for NuGet packages ?
Create nuget.config in directory with solution.
Paste this code to it.
Paste this code to it.
2016/07/16
2016/07/07
2016/05/16
2016/05/09
How to add existing resource file to project in c# ?
1. Install Add-in for Visual Studio: File nesting
2. Add root file and designer file
3. Right click on slave file -> File nesting -> Nest item
How to add existing WinForm to poject in C# ?
1. Select project -> Right click -> Add -> Existing item.. -> select root file -> Add as link
2016/03/21
2016/02/29
X509Certificate utils class
Download and add reference to BouncyCastle library: http://www.bouncycastle.org/csharp/
2016/02/26
2016/02/14
How to generate c# classes from xml ?
xsd is available in systems with .net installed.
Usually here: C:\Program Files (x86)\Microsoft SDKs\Windows\
fg. C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\xsd.exe
D:\temp>xsd test.xml
D:\temp>xsd test.xsd /classes
Solution found here: http://stackoverflow.com/a/4203551
Sometimes you will have to change generated cs files fg change double dimension array type [][] to []
Usually here: C:\Program Files (x86)\Microsoft SDKs\Windows\
fg. C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\xsd.exe
D:\temp>xsd test.xml
D:\temp>xsd test.xsd /classes
Solution found here: http://stackoverflow.com/a/4203551
Sometimes you will have to change generated cs files fg change double dimension array type [][] to []
2016/02/11
Resharper shortcuts
Shortcut | Meaning |
---|---|
ctrl + shift + v | Recent clipboard items |
alt+end | Ctrl + click on class, method -> derived symbols | Navigate -> Derived symbosl | Show all object that inherit from class or override methods |
2016/02/10
How to compare sql server databases structure and data ?
- Install SQL Server Data Tools component https://msdn.microsoft.com/en-us/library/hh272686(v=vs.103).aspx in your Visual Studio version.
- Show Sql Server Object Explorer in Visual Studio - View -> SQL Server Object Explorer
- Connect to server where one of your db is maintained in SQL Server Object Explorer Window
- Right click on the database and choose "Schema compare.." or "Data comparison"
How to read \ write to windows registry in c# ?
Run application with administartor privilages.
Subscribe to:
Posts (Atom)