Solved

Linq Error

Posted on 2010-08-29
3
466 Views
Last Modified: 2012-05-10
This code:
Dim timeformat2 As String = "d/MMM/yyyy"

Select New With {a.CTS = Convert.ToDateTime(a.CT).ToString(timeformat2), a.MD}

Open in new window


Thows this error: 'Anonymous type member name can be inferred only from a simple or qualified name with no arguments'

Has anyone else had this problem/found a solution?

Thanks in advance,

Jonathan
0
Comment
Question by:jonathangodwin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Expert Comment

by:mikek1966
ID: 33552250
To correct this error
•Assign the expression to a member name, as shown in the following code:

CopyDim instanceName2 = New With {.number = numbers(3)}
0
 
LVL 27

Expert Comment

by:nmarun
ID: 33555771
0
 
LVL 27

Accepted Solution

by:
nmarun earned 500 total points
ID: 33555798
0

Featured Post

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question