Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Adding Existing Framework in Xcode 4 and Getting Distinct Values in LinQ

DZone's Guide to

Adding Existing Framework in Xcode 4 and Getting Distinct Values in LinQ

· Java Zone
Free Resource

Build vs Buy a Data Quality Solution: Which is Best for You? Gain insights on a hybrid approach. Download white paper now!

How to Add Existing Framework in Xcode 4

1. Launch the Project Navigator .
2. Select the project.
3. Select the target.
4. Select the tab “Build Phases”.
5. Expand the “Link Binaries with Libraries” and then click the + button.
6. Select the framework and drag them to the Frameworks group.


How to Get an Array of Distinct Values from List Using LinQ

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace GinktageConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            List<Employee> employees = new List<Employee>();
            employees.Add(new Employee { Name = "Praveen", Experience = 6 });
            employees.Add(new Employee { Name = "Naveen", Experience = 4 });
            employees.Add(new Employee { Name = "Praveen", Experience = 1 });

            var query = (from employee in employees
                         select employee.Name).Distinct().ToArray();
            foreach(var item in query)
            {
                Console.WriteLine("Name : " + item + "\n");
                
            }
            Console.ReadLine();
        }
    }
    public class Employee
    {
        public string Name { get; set; }
        public int Experience { get; set; }
    }
}


Build vs Buy a Data Quality Solution: Which is Best for You? Maintaining high quality data is essential for operational efficiency, meaningful analytics and good long-term customer relationships. But, when dealing with multiple sources of data, data quality becomes complex, so you need to know when you should build a custom data quality tools effort over canned solutions. Download our whitepaper for more insights into a hybrid approach.

Topics:

Published at DZone with permission of Senthil Kumar, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}