Skip to main content

Upwork Knowledge of .Net Framework 4.0 Skills Test

1. Which of the following statements is correct for ASP.NET MVC Routing in .Net Framework 4.0?
Answers: • It is used to match the incoming requests and to map them to a controller action.

2. Consider the following code snippet:


namespace ExtensionMethods
{
public static class NumericExtensionMethods
{
  public static bool IsNumeric(this string s)
  {
    float output;
    return float.TryParse(s, out output);
  }
}
}

After adding the namespace, how will you call the ExtensionMethod on the string if your string variable is defined as:

string test="4";
Answers: • test.IsNumeric();

3. What is the purpose of the System.Windows.Data namespace in .Net framework 4.0?
Answers: • It contains classes used for binding properties to data sources, data source provider classes, and data-specific implementations of collections and views.

4. Suppose you want to eliminate duplicate elements from the array

int[] source = { 7, 4, 1, 3, 9, 8, 6, 7, 2, 1, 8, 15, 8, 23}

and sort the elements in descending order using LINQ in .Net framework 4.0. Which of the following statements can you use?
Answers: • var result = (from s in source orderby s descending select s).Distinct();

5. Which of the following classes of System.Windows.Media namespace provides rendering support in WPF which includes hit testing, coordinate transformation, and bounding box calculations in .Net framework 4.0?
Answers: • Visual

6. How will you count the odd numbers from the array shown below using LINQ in .Net framework 4.0?

int[]numbers={5,4,1,3,9,8,6,7,2,0};

Answers: • int findoddNumbers = numbers.Count(n => n % 2 == 1);
• int findoddNumbers = (from number in numbers where number%2==1 select numbers).Count();

7. Which of the following is NOT a valid data source control in .Net framework 4.0?
Answers: • All of the above are valid data sources

8. Which of the following statements is correct for WSHttpBinding of WCF in .Net framework 4.0?
Answers: • It is a secure and interoperable binding that is suitable for non-duplex service contracts.

9. What result will you get when you run the following LINQ query in .Net framework 4.0?

var scoreRecords = new[] { new {Name = "Alice", Score = 50},
    new {Name = "Bob" , Score = 40},
    new {Name = "Cathy", Score = 45}
};

var scoreRecordsDict = scoreRecords.ToDictionary(sr =>sr.Name);

Response.Write(scoreRecordsDict["Bob"]);
Answers: • { Name = Bob, Score = 40 }

10. Which of the following is the correct way to expand the size of application URLs in .Net framework 4.0?
Answers: • None of the above

11. How will you implement the logic for the following scenario in .Net framework 4.0?

Suppose you have a GridView with paging enabled. You select the third row on page 1 and then move to page 2. Nothing is selected on page 2. When you move back to page 1, the third row should still be selected.
Answers: • Set the GridView EnablePersistedSelection property to true.

12. How do you add MetaDescription to your web page in .Net framework 4.0?
Answers: • Page.MetaDescription

13. Which of the following statements is correct for the bubbling routing strategies used by the routing events in WPF in .Net framework 4.0?
Answers: • This event is first raised on the source element, then on each element up the tree until the root is reached.

14. How many columns can you select by $orderby OData system query option in .Net Framework 4.0?
Answers: • 12

15. Which of the following OData system query options is used to determine the maximum number of records to be returned in .Net framework 4.0?
Answers: • $top

16. How can you determine, at runtime, if your application is running in the 64-bit version of .Net framework 4.0?
Answers: • Check IntPtr.Size property for a value of 8.

17. Suppose your WCF service root URL is "http://examples.svc". What will be the response when you request a WCF data service URL with a $skip system query option, as shown below, in .Net framework 4.0?

http://examples.svc/Products?$skip=2&$top=2&$orderby=Rating
Answers: • The response will be the third and fourth product entries from the collection of all products after sorting the collection in ascending order of Rating.

18. Which of the following arrays will be returned as result when you run the following LINQ query in .Net framework 4.0?

object[] varnumbers = { null, 1.0, "two", 3, "four", 5, "six", 7.0 };

var doubles = varnumbers.OfType<double>();

foreach (var d in doubles)
{
    Response.Write(d);
}
Answers: • 1, 7

19. Which of the following ASP.NET MVC namespaces includes the classes that support forms, input controls, links, partial views, and validation in .Net Framework 4.0?
Answers: • System.Web.Mvc.Html

20. What is DLR in .Net framework 4.0?
Answers: • It is a runtime environment that adds a set of services for dynamic languages to the common language runtime.

21. What is default format used to represent data returned in an ADO.NET Data Services response in .Net framework 4.0?
Answers: • Atom

22. Considering the image, which of the following is the correct syntax for encoding a particular string in .Net framework 4.0?
Answers: • Both a and b

23. In WCF, what is the significance of the ReceiveRetryCount property of a Poison message in .Net framework 4.0?
Answers: • It is an integer value that indicates the maximum number of times to retry delivery of a message from the application queue to the application.

24. Which of the following is NOT a valid WPF Localizability attribute in .Net framework 4.0?
Answers: • All of the above are Localizability attributes

25. Which of the following is NOT a valid QueryExtender filter option in .Net framework 4.0?
Answers: • All of the above are valid QueryExtender filter options

26. What is the function of WCF Data contracts in .Net framework 4.0?
Answers: • They define, for each parameter or return type, what data is serialized to be exchanged.

27. Which of the following pieces of information is provided by the WCF service contract in .Net framework 4.0?
Answers: • The location of the operations.

28. Suppose your site has a page called Index.aspx that you no longer use. Search engines may keep requesting this page.

Which of the following method will you add to the CodeBehind file of Index.aspx that will send requests (including search engine requests) to Default.aspx in .Net framework 4.0?
Answers: • Response.RedirectPermanent

29. How will you display the view data in the view of an ASP.NET MVC Application?
Answers: • <%: ViewData["CurrentTime"] %>

30. How is data passed from controllers to views in an ASP.NET MVC Application?
Answers: • Using ViewData

31. What result will you get when you run the following LINQ query in .Net framework 4.0?

List<string> alphabets = new List<string>() { "whats", "new", "in", "aspnet" };
  var alphabetsquery = from alphabet in alphabets select alphabet.Substring(0, 1);
  foreach (var alpha in alphabetsquery)
  {
    Response.Write(alpha);
  }
Answers: • wnia

32. What is a Decorator in WPF of .Net framework 4.0?

Answers: • It is the base class for elements that apply effects onto or around a single child element, such as Border or Viewbox.

Comments

Popular posts from this blog

How to Choose Best Digital Marketing Engineer for your Business ?

Digital Marketing is new marketing concept of products, services and others using digital technologies on the internet. Previously we know digital marketing interms of internet marketing or online marketing. Digital marketing campaign is run on all the platform like; Desktop, tablet, mobile etc. Digital Marketing functions are SEO(search engine optimization), SEM(search engine marketing), Content Marketing, campaign marketing, e-commerce marketing, SMM(social media marketing), SMO(social media optimization), E-mail marketing, display advertising, games, ASO(Apps store optimization), Bulk SMS, branding, reputation management and other digital marketing platform techniques. If we can talk about simple SEO executive role, PPC Analyst role, SMO expert role or other single task handler then its a single activity performer. But if we hire a digital marketing engineer then its necessary that he has knowledge and working ability of all above digital marketing techniques. Simply we

Top SEO Companies in India by TOPSEO's Ranking

I am providing you the list of top 10 SEO Companies/Firms/Agencies in India by TOPSEO's  (January 2016) 1. SEO.IN  Year Founded: 2002 Website: http://www.seo.in / 2. SEOValley Solutions Private Limited Year Founded: 2000 Website: http://www.seovalley.com / 3. PageTraffic Year Founded: 2002 Website: http://www.pagetraffic.com/ 4. SeoTonic Web Solutions Private Ltd. Year Founded: 2006 Website: http://www.seotonic.com/ 5. Outsource SEO Year Founded: 2004 Website: http://www.outsourceseo.com/ 6. Ranking By SEO Year Founded: 2008 Website: http://www.rankingbyseo.com/ 7. Techmagnate Year Founded: 2006 Website: http://www.techmagnate.com / 8. SEO Discovery Year Founded: 2006 Website: http://www.seodiscovery.com/ 9. Greenlemon Year Founded: 1999 Website: http://greenlemon.in/ 10. SEOXperts India Year Founded: 2008 Website: http://www.seoxpertsindia.com/

Vivo IPL(10) 2017 Schedule , Player List , Team And Venue Details

IPL (10) 2017 Schedule is yet to be announced by the governing council of the Indian premier League . As per the previous sessions of the IPL it might also schedule to start from April 2017 to May 2017 . This session of IPL will also known as the Vivo Ipl (10)2017 because Vivo Electronics got the title sponsorship to 2 year after Pepsi terminated the contract back in 2016 . Like last year former IPL champions Chennai Super Kings and Rajasthan Royal will not participate the the tournament till this year . As per the schedule set by the IPL Committee, the Indian Premier League 2017 would be starting from 3rd of April and continue till 26th of May 2017. The first match of IPL 10 will have the IPL 5 winner Kolkata Knight Riders battling against Delhi Daredevils. The inaugural match as well as the final match of the IPL season 10 championship scheduled for 26th of May would be hosted by Eden Gardens, the home ground for superstar Shah Rukh Khan owned Kolkata Knight Riders. There wou