Posts

Showing posts with the label compare

Mobile development opportunities

I was recently asked about the differences between the major mobile development markets what opportunities are there for developers. After some research to fill-in the gaps, I have came up with a comparison table. mobile development plan store price price for companies duration mobile apps (2014) language ref google play $25 $25 one-time 1.3M Java here windows store $19 $99 one-time 300K C# here apple store $99 $199 1 year 1.2M Objective-C / Swift here What this table tells us, is that we have right away some big differences. If you are a typical Microsoft-oriented developer, you may opt with the windows store. You will get one of the best access fees (only $19) and you will be able to develop using the frameworks that you are used to. Being a still growing market, there is a larger chance to create new apps that haven't been thought up before. If you want to enter the Apple ecosystem, many bloggers recommend that you start with Objective-C . But you should know th...

Compare a string with a list of strings using IEqualityComparer

Problem: Check if a string appears, partially, on a list of strings. The List.Contains() method does this, but it only returns complete matches. Solution: Create a custom IEQualityComparer. string[] excludePages = { "string1", "string2", "string3", "str"}; StringEqualityComparer comparer = new StringEqualityComparer(); if (excludePages.Contains("string2", comparer)) { //string 2 exists in excludePages } else { //string 2 does not exist in excludePages } public class StringEqualityComparer : IEqualityComparer { public bool Equals(string currentListString, string testString) { return (testString.Contains(currentListString)); } public int GetHashCode(string obj) { return obj.GetHashCode(); } } Source: http://www.java2s.com/Code/CSharp/LINQ/ContainswithstringvalueandIEqualityComparer.htm