- Merge WPF and Silverlight. .NET Framework and .NET Compact Framework. It would be better to have just different profiles of framework like (.NET client profile) instead of different frameworks.
- Non-nullable references
string! x = "xxx";
- Discriminated unions:
union MyUnion: Enum { case Enum.Red: RedClass; case Enum.Green: GreenClass; ... }
- INumeric interface for standard numeric types.
struct UInt32: INumeric<UInt32> { ... } - Fixed size arrays
byte[10] x; - Operator extensions (syntax sugar):
public static class Extensions { public static T operator+ <T>(T a, T b) where T: INumeric<T> ... }
- Polymorphic up cast:
class A: B { ... } ... new A() up B
Update: No needs any more. Solution:
public static class Extension { public static T UpCast<T>(T derived) { return derived; } }
Example:
new B().UpCast<A>() - Force use 'using' keyword for some classes.
using class My: IDisposable { .... } ... // Ok. using(var my = new My()) { } // Compilation error. { var my = new My(); } // Ok. return new My();
- Units of measurements. As in F# http://msdn.microsoft.com/en-us/library/dd233243.aspx.
- Named code blocks.
code Block { foreach(var x in M) { foreach(var y in x) { if(y) break Block; } } } - A reference to an anonymous delegate inside the delegate.
Control.Selected += (s, e) => { ... Control.Selected -= this function; }
Monday, January 31, 2011
.NET/C# 5 wish list
Tuesday, December 28, 2010
.NET Frameworks
Class Library / Windows Metro style
- Runtime: ?
- Framework: .NETCore
- Version: 4.5
Class Library / .NET Framework 4 Client
- Runtime: 4.0.30319
- Framework: .NETFramework
- Version: 4.0
- Profile: Client
Windows Game Library / .NET Framework 4 Client
- Runtime: 4.0.30319
- Framework: .NETFramework
- Version: 4.0
- Profile: Client
Xbox 360 Game Library
- Runtime: 2.0.50727
Silverlight Class Library / Silverlight 4
- Runtime: 2.0.50727
- Framework: Silverlight
- Version: 4.0
Silverlight for Windows Phone 7.1
- Runtime: ?
- Framework: Silverlight
- Version: 4.0
- Profile: WindowsPhone71
Silverlight for Windows Phone 7.0
- Runtime: 2.0.50727
- Framework: Silverlight
- Version: 4.0
- Profile: WindowsPhone
Silverlight Class Library / Silverlight 3
- Runtime: 2.0.50727
Windows Phone Game Library
- Runtime: 2.0.50727
Friday, December 10, 2010
CSS gradient on C#
CSS gradient on C# using CityLizard Framework. Works in IE 5.5-8.0, FireFox 3.6, Chrome 8.0, Safari 5.0 and Opera 10.
namespace Css { using S = www_w3_org._2000.svg.X; using D = System.Drawing; class Gradient { class Svg : S { public T.svg Gradient(string start, string end) { return svg_(width: "100%", height: "100%") [defs [linearGradient_( id: "grad", x1: "0", y1: "0", x2: "0", y2: "100%") [stop_(offset: "0", stop_color: start)] [stop_(offset: "1", stop_color: end)] ] ] [rect_( width: "100%", height: "100%", x: "0", y: "0", style: "fill:url(#grad)") ]; } } static string X2(byte x) { return x.ToString("X2"); } static string ToString(D.Color c) { return "#" + X2(c.R) + X2(c.G) + X2(c.B); } static byte Avg(byte a, byte b) { return (byte)((a + b) / 2); } static D.Color Avg(D.Color a, D.Color b) { return D.Color.FromArgb( Avg(a.R, b.R), Avg(a.G, b.G), Avg(a.B, b.B)); } public static string Y(D.Color Start, D.Color End) { var s = ToString(Start); var e = ToString(End); var svgB = new Svg().Gradient(s, e).ToString(); var svg = ""; foreach (var c in svgB) { var x = (int)c; if (x <= 0x40) { svg += "%" + x.ToString("X2"); } else { svg += c; } } // Next browsers to test: Opera 11 (hopefully it has CSS gradient), // IE 9. return // for other browsers. "background: " + ToString(Avg(Start, End)) + ";" + // Opera 10. It also works for Chrome and Safari. "background: url(\"data:image/svg+xml," + svg + "\");" + // IE 5.5-8.0. "filter: progid:DXImageTransform.Microsoft.gradient(" + "startColorstr='" + s + "', endColorstr='" + e + "');" + // webkit browsers (Chrome, Safari). It is not required // because SVG gradient for Opera works fine for these // browsers. /* "background: -webkit-gradient(" + "linear, left top, left bottom, from(" + s + "), to(" + e + "));" + */ // FireFox 3.6+ "background: -moz-linear-gradient(top, " + s + ", " + e + ");"; } } }
Monday, December 6, 2010
List of free tools
Tools
- Windows Developer Preview http://msdn.microsoft.com/en-us/windows/apps/br229516. Freeware.
- Windows 7 USB/DVD Download Tool. http://www.microsoftstore.com/store/msstore/html/pbPage.Help_Win7_usbdvd_dwnTool or http://wudt.codeplex.com. GNU GPL.
- Git Extensions http://gitextensions.sourceforge.net/. GPL 3.
- Nemiver http://projects.gnome.org/nemiver/. Open Source. GPL.
- TortoiseHg http://tortoisehg.bitbucket.org/. Open Source. GPL 2.
- Visual Studio 2010 Express http://www.microsoft.com/express/Downloads/. Freeware.
- Visual C# 2010 Express
- Visual C++ 2010 Express
- Visual Web 2010 Express, even if you do not develop ASP.NET application, the IDE editor is really good for HTML, JavaScript, CSS, and XML.
- Windows Phone Developer Tools
- Visual Studio 2010 Downloads. http://msdn.microsoft.com/en-us/vstudio/bb984878. Freeware.
- Visual Studio 2010 Shell (Integrated) for F#.
- Visual Studio 2010 Shell (Isolated).
- Visual Studio 2008 Shell (Isolated) with SP1 as an IDE for Nemerle, http://www.microsoft.com/downloads/en/details.aspx?familyid=021b3bee-b2ad-42a8-854a-c5eaef69e927&displaylang=en. Freeware.
- Microsoft SQL Server 2008 R2 Express. http://www.microsoft.com/express/Database/.
- Windows SDK adds x64 and Itanium to Visual C++ 2010 Express. http://msdn.microsoft.com/en-us/windows/bb980924. Freeware.
- Windows PowerShell 2.0 http://support.microsoft.com/kb/968930. Freeware.
- SP1 for Visual Studio 2010 http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=23691. Freeware.
- NUnit http://www.nunit.org/. Open Source. NUnit license.
- Boost http://www.boost.org/. Open Source. Boost licence.
- Far Manager http://www.farmanager.com/. Open Source. Revised BSD license.
- 7-Zip http://www.7-zip.org/. Open Source. GNU LGPL + unRAR restrictions.
- Sandcastle Help File Builder http://shfb.codeplex.com/. Open Source. Ms-PL.
- Mono http://www.mono-project.com/. Open Source. GPL, LGPL, MIT X11, Microsoft Permissive License.
- MonoDevelop http://monodevelop.com/. Open Source. LGPLv2 and MIT X11.
- yEd http://www.yworks.com/en/products_yed_about.html. Freeware.
- WiX http://wix.codeplex.com/. Open Source. Common Public License Version 1.0.
- SharpDevelop http://www.icsharpcode.net/OpenSource/SD/Default.aspx. Open Source. LGPL.
- ILSpy http://wiki.sharpdevelop.net/ilspy.ashx. Open Source.
- Doxygen http://www.stack.nl/~dimitri/doxygen/. Open Source. GPL.
Browsers
- Firefox http://www.mozilla.com/firefox/. Open Source. Mozilla Public License.
- Chrome http://www.google.com/chrome. Freeware.
- Safari http://www.apple.com/safari/. Freeware.
- Opera http://www.opera.com. Freeware.
- Internet Explorer. Freeware.
- Microsoft Expression Web SuperPreview http://www.microsoft.com/downloads/en/details.aspx?FamilyID=8e6ac106-525d-45d0-84db-dccff3fae677&displaylang=en. Freeware.
- IETester http://www.my-debugbar.com/wiki/IETester/HomePage. Freeware.
Others
- VirtualBox http://www.virtualbox.org/
- openSUSE http://software.opensuse.org/. Open Source. GPLv2. Binaries for Personal Use.
- Free Download Manager http://www.freedownloadmanager.org/. Open Source. GPL.
- OpenProj http://openproj.org/openproj. Freeware. CPAL.
- LibreOffice http://www.libreoffice.org/. Open Source. GNU Lesser General Public License.
- Open Office http://www.openoffice.org/. Open Source. GNU Lesser General Public License.
- Thunderbird http://www.mozillamessaging.com/thunderbird.. Open Source. MPL, GPL, LGPL,
- Skype http://www.skype.com/. Freeware.
- KeePass http://keepass.info/. Open Source. GPL.
- TortoiseSVN http://tortoisesvn.net/. Open Source. GPL.
- VisualSVN Server http://www.visualsvn.com/server/. Freeware.
- ImgBurn http://www.imgburn.com/. Freeware.
- Adobe Reader http://get.adobe.com/reader/. Freeware.
- ZoneAlarm Free Firewall http://www.zonealarm.com/security/en-us/trialpay-za-signup.htm. Freeware.
- CCCP http://www.cccp-project.net/. Freeware.
- µTorrent http://www.utorrent.com/. Freeware.
- WinCDEmu http://wincdemu.sysprogs.org. Open Source. LGPL.
- Security Essentials http://www.microsoft.com/security_essentials/. Freeware.
- AVG Free http://free.avg.com/. Freeware.
- Blender http://blender.org/. Open Source. GNU GPL.
Subscribe to:
Posts (Atom)