score:-1
i didn't want to hassle more with the beginning space and finally made a decition to just allow the initial space and just strip all spaces from the meta string eventually anyhow.
the problem actually turns out to be in the event it self so this was by solution for the being. im not looking anything more into this since in turning over to meta with tags inside the actual message instead. and with a prefix. eg. @meta lets see how that works ;)
private string metainput { get; set; }
public string metainput
{
get
{
return metainput;
}
set
{
string x = value;
if (x.length > 3)
{
if (x.endswith(" "))
{
string z = x.replace(" ", "");
x = z.replace(",", "");
int l = x.length;
if (l > 2)
{
metainput = null;
savemetaword(x);
}
else
{
metainput = null;
}
}
}
else
{
metainput = value;
}
}
}
score:2
you final select has to be string and not the anonymous type
var str = from cu in x
// your stuff
select cu.username + cu.fname;
the other option is to keep your anonymous types and use stringformat in the binding
<textblock >
<textblock.text>
<multibinding stringformat="{}{0} {1}">
<binding elementname="username" path="text"/>
<binding elementname="name" path="text"/>
</multibinding>
</textblock.text>
</textblock>
yet another option is to have a field in the anonymous type that has the complete string that you want displayed and use displaymemberpath for binding
Source: stackoverflow.com
Related Query
- Populating a AutoCompleteBox with a list of anonymous types
- Linq Anonymous Types with list objects
- LINQ Select Distinct with Anonymous Types
- How can anonymous types be created using LINQ with lambda syntax?
- VB.NET linq group by with anonymous types not working as expected
- return list with anonymous type in entity framework
- Distinct in LINQ with anonymous types (in VB.NET)
- Difference of two List with different types using LINQ
- How to have a list with different data types of lists in it as a sublists?
- How do I dynamically construct an Expression Tree to use with anonymous types
- List with anonymous type
- C# - Linq optimize code with List and Where clause
- Is it possible to have an anonymous method when creating a list of items, with .NET + Linq?
- TryGetValue() in linq expression with anonymous types
- Extract List elements of specific types with LINQ
- Public property List needs to Concat 2 types with inheritance
- Linq returning list of anonymous types
- Use linq to make a projection of an anonymous class with a list
- Getting single result from a query with anonymous types in Linq To Sql
- How are anonymous types initialized with LINQ to Entities?
- Declaration of list of anonymous types
- multiple linq joins with anonymous types using lambda syntax
- I can't get pagination to show up in every page on a GridView with a list as source
- Join 2 lists on empty strings with Anonymous types in Linq
- LinqToSharepoint insert to list with multiple content types
- LINQ: Dealing with anonymous types
- Declaring list with anonymous type
- Need advice on how to best deal with the storing/unboxing of different types in a list and what is more optimal in my case
- Assigning anonymous type multiple times with the same property names and types
- Working with Anonymous Types with Linq in VB, C#
More Query from same tag
- Sequence contains no matching element, FirstOrDefault
- How to use DateTime.Parse() method both side (i.e in expression left and expression right ) while creating expression tree?
- Linq to Entities question
- Add items to list from IEnumerable using LinQ
- Oracle SQL statement to Linq Not working
- LINQ/Lambda expression: Join lists and find the average counts of data with the given formula
- Group 2 similar requests Entity Framework / Linq in 1
- Get N tweets from list in twitter using linq2twitter
- Lambda expressions to obtain data through navigation properties, LINQToEntities
- LINQ apply filter in where clause only if parameter value greater than Zero?
- Doing a join such that the first row only is returned
- How to change calculation type using lambda expression?
- How to filter in one-to-many relationship tables in LINQ?
- Does "Select New" in linq trigger an evaluation / load?
- LINQ - Select Statement - The null value cannot be assigned to a member with type System.Int32 which is a non-nullable value type
- Sum a List, but only for values after a certain point
- What's the better way to write this linq query?
- How can I retrieve two entities that are associated with a connection entity, only under the name record2roleid?
- How to update a global variable inside `where` clause in LINQ?
- nhibernate query without collections
- "The specified type member 'Date' is not supported in LINQ "
- Errors 11 and 2002: "The EntityContainer ... does not exist in MetadataWorkspace"
- Linq Expression - How to initialize with Expression.And properly?
- LINQ to Entities does not recognize the method (Trying to get Previous and Next record)
- How to look at sql generated by EntityFramework when Count is used
- Querying a nested list using linq
- MVC5/EF/LINQ - Multiple Select Count queries returned to a view, best practice
- Custom data provider?
- UNION from multiple lists
- Which is a better linq query? .Where(crit).FirstOrDefault() or .Where(someCrit).FirstOrDefault(someOtherCrit)?