Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Linq Error

Posted on 2010-08-29
3
Medium Priority
?
469 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 2000 total points
ID: 33555798
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

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.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to shrink a transaction log file down to a reasonable size.

705 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