How to deal with deprecated classes in Android to keep compatibility

You can do that (checking the API version). You can also use reflection to call the newer classes. I wouldn’t worry about using deprecated methods as all Android versions are backwards compatible, saying that you want to watch when things are for 3.0 Honeycomb as these are a little different. Here’s an explanation of how … Read more

How to create a SerializationBinder for the Binary Formatter that handles the moving of types from one assembly and namespace to another

This could work (instead of your override). public override Type BindToType(string assemblyName, string typeName) { var m = Regex.Match(typeName, @”^(?<gen>[^\[]+)\[\[(?<type>[^\]]*)\](,\[(?<type>[^\]]*)\])*\]$”); if (m.Success) { // generic type var gen = GetFlatTypeMapping(m.Groups[“gen”].Value); var genArgs = m.Groups[“type”] .Captures .Cast<Capture>() .Select(c => { var m2 = Regex.Match(c.Value, @”^(?<tname>.*)(?<aname>(,[^,]+){4})$”); return BindToType(m2.Groups[“aname”].Value.Substring(1).Trim(), m2.Groups[“tname”].Value.Trim()); }) .ToArray(); return gen.MakeGenericType(genArgs); } return GetFlatTypeMapping(assemblyName,typeName); } … Read more

Detect IE8 Compatibility Mode [duplicate]

IE8 includes a trident token in the User-Agent string regardless of compatibility mode. See MSDN for more details: The Internet Explorer 8 User-Agent String (Updated Edition) IE7 on Windows Vista Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) IE8 on Windows Vista (Compatibility View) Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0) IE8 on Windows Vista … Read more

Why does aggregate initialization not work anymore since C++20 if a constructor is explicitly defaulted or deleted?

The abstract from P1008, the proposal that led to the change: C++ currently allows some types with user-declared constructors to be initialized via aggregate initialization, bypassing those constructors. The result is code that is surprising, confusing, and buggy. This paper proposes a fix that makes initialization semantics in C++ safer, more uniform,and easier to teach. … Read more

Static analysis tool to detect ABI breaks in C++ [closed]

abi-compliance-checker – a tool for checking backward binary/source-level compatibility of a shared C/C++ library (DSO): A tool for checking backward binary and source-level compatibility of a C/C++ library. The tool checks header files and shared libraries of old and new versions and analyzes changes in API and ABI (ABI=API+compiler ABI) that may break binary and/or … Read more