Hi Friends this is Sreenivas .If u want any technical clarification on .Net i can help u out.Please contact +91-9642411153 1 Double d=decimal.ToDouble("Decimal Value"); 2 Double d= (double)("decimalValue"); 3 Double d=Convert.ToDouble("Decimalvalue");
the below value shoub be our requirements . then we need to convert that into list format. String stt= "2, 4, 5, 6, 7"; List <string> listValues=stt. Split (', '). Select (Int. parse). ToList (); o/p: '-------- listValues = [ 2, 4, 5, 6, 7]; listValues [0]=2;
User Table: ========= Create Table User ( Id int Identity(1,1) Primary Key, Name Nvarchar(100) null ); insert into User values("Sreenivas")("Sreenivasulu"); IN SQL Server script: ================ Select Top 5 * from Users order by Name -- Top 5 Select Top 5 * from Users order by Name desc -- Last 5 In LINQ Query: ============ _Context.Users.OrderBy(a=>a.Name).Take(5); -- Top 5 _Context.Users.OrderByDecending(a=>a.Name).Take(5); -- Last 5
Comments
Post a Comment