Solved

Linq Error

Posted on 2010-08-29
3
452 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
  • 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now