¡@

Home 

c# Programming Glossary: distinct

c# random string generator

http://stackoverflow.com/questions/1122483/c-sharp-random-string-generator

My goal is to be able to run this twice and generate two distinct four character random strings. However it just generates one.. look something like this UNTE FWNU How can I ensure two distinct random strings Thanks c# random share improve this question..

How to select distinct values from datatable?

http://stackoverflow.com/questions/1199176/how-to-select-distinct-values-from-datatable

to select distinct values from datatable How to select distinct values from datatable.. to select distinct values from datatable How to select distinct values from datatable in C# For a retrieved data from database.. in C# For a retrieved data from database I need to get its distinct value in C# c# select datatable distinct share improve this..

Distinct() with lambda?

http://stackoverflow.com/questions/1300088/distinct-with-lambda

with lambda Right so I have an enumerable and wish to get distinct values from it. Using System.Linq there's of course an extension.. the simple case it can be used with no parameters like var distinctValues myStringList.Distinct Well and good but if I have an enumerable.. to specify equality the only available overload is var distinctValues myCustomerList.Distinct someEqualityComparer The equality..

Recommended ServiceStack API Structure

http://stackoverflow.com/questions/15231537/recommended-servicestack-api-structure

a message based design so you should give each operation a distinct message. Use a logical hierarchical Url structure I'd use a..

Distinct by property of class by linq

http://stackoverflow.com/questions/2537823/distinct-by-property-of-class-by-linq

this collection to Cars with unique CarCodes c# linq distinct share improve this question You can use grouping and get.. grouping and get the first car from each group List Car distinct cars .GroupBy car car.CarCode .Select g g.First .ToList share..

Is there a better alternative than this to 'switch on type'?

http://stackoverflow.com/questions/298976/is-there-a-better-alternative-than-this-to-switch-on-type

case because is a relationships mean that more than one distinct case might apply is there a better way to simulate switching..

Is it possible to programmatically generate an X509 certificate using only C#?

http://stackoverflow.com/questions/3770233/is-it-possible-to-programmatically-generate-an-x509-certificate-using-only-c

of the certificate and the private key but they are two distinct entities. The whole point of using certificates is to send them..

DateTime vs DateTimeOffset

http://stackoverflow.com/questions/4331189/datetime-vs-datetimeoffset

with a DateTime where .Kind is DateTimeKind.Utc . This is distinct from calendar time which is a position on someone's calendar..

LINQ to SQL using GROUP BY and COUNT(DISTINCT)

http://stackoverflow.com/questions/448203/linq-to-sql-using-group-by-and-countdistinct

to perform the following SQL query select answer_nbr count distinct user_nbr from tpoll_answer where poll_nbr 16 group by answer_nbr.. where a.poll_nbr 16 select a.answer_nbr a.user_nbr distinct maps to the following SQL query select distinct answer_nbr distinct.. a.user_nbr distinct maps to the following SQL query select distinct answer_nbr distinct user_nbr from tpoll_answer where poll_nbr..

Linq Distinct on a particular Property

http://stackoverflow.com/questions/489258/linq-distinct-on-a-particular-property

easy to do this is not the question . What if want to distinct a list of Object on ONE or MORE Properties of the object Example.. is Person with Property Id . How can I get all Person and distinct them by the property Id of the object Person1 Id 1 Name Test1.. EDIT This is now part of MoreLINQ . What you need is a distinct by effectively. I don't believe it's part of LINQ as it stands..

LINQ Select Distinct with Anonymous Types

http://stackoverflow.com/questions/543482/linq-select-distinct-with-anonymous-types

way to achieve that result if this doesn't do it c# linq distinct anonymous types equality share improve this question Have..

What does the [Flags] Enum Attribute mean in C#?

http://stackoverflow.com/questions/8447/what-does-the-flags-enum-attribute-mean-in-c

MyColors Yellow 1 Green 2 Red 4 Blue 8 To retrieve the distinct values in you property one can do this if myProperties.AllowedColors..

How to get distinct instance from a list by Lambda or LINQ

http://stackoverflow.com/questions/1183403/how-to-get-distinct-instance-from-a-list-by-lambda-or-linq

list like this List MyClass T list ... List MyClass T listDistinct new List MyClass T foreach MyClass T instance in list some code.. MyClass T instance in list some code to check if listDistinct does contain obj with intance.Value1 then listDistinct.Add instance.. listDistinct does contain obj with intance.Value1 then listDistinct.Add instance What is the lambda or LINQ way to do it c# linq..

Distinct() with lambda?

http://stackoverflow.com/questions/1300088/distinct-with-lambda

with lambda Right so I have an enumerable and wish to get distinct.. System.Linq there's of course an extension method called Distinct . In the simple case it can be used with no parameters like.. with no parameters like var distinctValues myStringList.Distinct Well and good but if I have an enumerable of objects for which..

Distinct not working with LINQ to Objects

http://stackoverflow.com/questions/1365748/distinct-not-working-with-linq-to-objects

not working with LINQ to Objects class Program static void.. Wooley var temp books.SelectMany book book.Authors .Distinct foreach var author in temp Console.WriteLine author.FirstName.. even tried overriding Euals method in Author class. Still Distinct does not seem to work. What am I missing Edit I have added and..

Preserving order with LINQ

http://stackoverflow.com/questions/204505/preserving-order-with-linq

Order we don't know what order to expect results in. Distinct ToDictionary ToLookup Redefines Order Explicitly use these to..

How to do a full outer join in Linq?

http://stackoverflow.com/questions/2085422/how-to-do-a-full-outer-join-in-linq

.Union StudentTeachers.Select st st.StudentID .Distinct Distinct not necessary after Union var q from id in studentIDs.. .Union StudentTeachers.Select st st.StudentID .Distinct Distinct not necessary after Union var q from id in studentIDs join sc..

Distinct by property of class by linq

http://stackoverflow.com/questions/2537823/distinct-by-property-of-class-by-linq

by property of class by linq I have a collection List Car cars..

What guarantees are there on the run-time complexity (Big-O) of LINQ methods?

http://stackoverflow.com/questions/2799427/what-guarantees-are-there-on-the-run-time-complexity-big-o-of-linq-methods

the more complex operations the set like operators Union Distinct Except etc. work using GetHashCode by default afaik so it seems.. so that this operation is O 1 instead of O N . Distinct GroupBy Join and I believe also the set aggregation methods..

IEnumerable vs List - What to Use? How do they work?

http://stackoverflow.com/questions/3628425/ienumerable-vs-list-what-to-use-how-do-they-work

animal.SpeciesKey equals race.SpeciesKey select animal .Distinct .ToList or IEnumerable Animal sel from animal in Animals join.. animal.SpeciesKey equals race.SpeciesKey select animal .Distinct I changed the names of my original objects so that this looks.. goes in and what goes out of it I noticed that if I use Distinct the inner contains 6 items this is incorrect as only 2 are Distinct..

Linq Distinct on a particular Property

http://stackoverflow.com/questions/489258/linq-distinct-on-a-particular-property

Distinct on a particular Property I am playing with Linq to learn about.. with Linq to learn about it but I can't figure out how to Distinct when I do not have a simple list a simple list of integer is.. fairly easy to write public static IEnumerable TSource DistinctBy TSource TKey this IEnumerable TSource source Func TSource..

Why is there no Linq method to return distinct values by a predicate?

http://stackoverflow.com/questions/520030/why-is-there-no-linq-method-to-return-distinct-values-by-a-predicate

What I want to do is something like this return myList.Distinct x y x.Url y.Url I can't there's no extension method in Linq.. key. I could also add my own public static IEnumerable T Distinct T this IEnumerable T input Func T T bool compare write my own.. As you say it's easy to write although I prefer the name DistinctBy to match OrderBy etc. Here's my implementation if you're interested..

LINQ Select Distinct with Anonymous Types

http://stackoverflow.com/questions/543482/linq-select-distinct-with-anonymous-types

Select Distinct with Anonymous Types So I have a collection of objects. The.. item new Alpha item.propOne Bravo item.propTwo .Distinct So my question is Will Distinct in this case use the default.. Bravo item.propTwo .Distinct So my question is Will Distinct in this case use the default object equals which will be useless..

Avoid duplicate names in a dataset

http://stackoverflow.com/questions/13090398/avoid-duplicate-names-in-a-dataset

names from your HistoryTable you should use the keyword DISTINCT string sql select DISTINCT Name from Historytable however seeing.. you should use the keyword DISTINCT string sql select DISTINCT Name from Historytable however seeing your update I think you..

When is it better to write “ad hoc sql” vs stored procedures [duplicate]

http://stackoverflow.com/questions/2734007/when-is-it-better-to-write-ad-hoc-sql-vs-stored-procedures

parameterization is long for example forget about using DISTINCT TOP UNION GROUP BY OR etc. so you really cannot count on this..

LINQ to SQL using GROUP BY and COUNT(DISTINCT)

http://stackoverflow.com/questions/448203/linq-to-sql-using-group-by-and-countdistinct

to SQL using GROUP BY and COUNT DISTINCT I have to perform the following SQL query select answer_nbr.. this question There isn't direct support for COUNT DISTINCT x but you can simulate it from an IGrouping i.e. what group.. does the job SELECT t1 . Country SELECT COUNT FROM SELECT DISTINCT t2 . City FROM dbo . Customers AS t2 WHERE t1 . Country IS NULL..

How to optimize MySQL Boolean Full-Text Search? (Or what to replace it with?) - C#

http://stackoverflow.com/questions/6034976/how-to-optimize-mysql-boolean-full-text-search-or-what-to-replace-it-with

I dict AS D WHERE I.word_id D.id AND D.word 'word3' SELECT DISTINCT rec_id FROM temp_results DROP TABLE temp_results NOTE This is..

Is it possible to use a MySql User Defined Variable in a .NET MySqlCommand?

http://stackoverflow.com/questions/958953/is-it-possible-to-use-a-mysql-user-defined-variable-in-a-net-mysqlcommand

@rownum 1 rownum t . FROM SELECT @rownum 0 r SELECT DISTINCT TYPE FROM `node` WHERE TYPE NOT IN 'ad' 'chatroom' t It is using..