Does C# support templates?

Author Topic: Does C# support templates?  (Read 1263 times)

Offline chinmay.sahooTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 2
  • Posts: 158
  • Karma: 0
    • Hot Shaper
Does C# support templates?
« on: 03-08-2016, 05:22:05 »
No, C# doesn’t support templates. They support a type of template known as generic. It has a similar syntax but instantiated during run time.


Offline TomClarke

  • Trade Count: (0)
  • Hero Member
  • *****
  • Thank You 50
  • Posts: 874
  • Karma: 0
  • Gender: Male
    • Custom Writing Service & Content Marketplace
Re: Does C# support templates?
« Reply #1 on: 05-16-2016, 00:35:45 »
That is true. C#  support the concept of an indexer  from language spec. Whereas propoerties enable field-like access, indexers enable array-like access.
Indexer declarations are similar to property declarations, with the main differences being that indexers are nameless and that indexers include indexing parameters. The indexing parameters are provided betweeen square brackets.
Your ideas, our writings - Writology.com

Offline siyajoshi

  • Trade Count: (0)
  • Jr. Member
  • **
  • Thank You 10
  • Posts: 70
  • Karma: 0
  • Gender: Female
Re: Does C# support templates?
« Reply #2 on: 05-20-2016, 02:18:59 »
No C# do not support template, but no need to worry, you can use generic instead of template in C# both have many differences, but generic provide more functionality and more easy in writing syntax. C# generic work at runtime to instantiated objects and substitutions also performed at runtime.

« Last Edit: 05-20-2016, 10:37:43 by Sevam »
Live life

 

Related Topics

  Subject / Started by Replies Last post
6 Replies
2996 Views
Last post 12-13-2011, 07:07:33
by electra
1 Replies
3723 Views
Last post 05-30-2010, 17:16:01
by Sevam
3 Replies
6078 Views
Last post 06-03-2017, 03:05:16
by michral86
0 Replies
1270 Views
Last post 08-09-2013, 22:19:33
by flamefox16
0 Replies
510 Views
Last post 03-29-2016, 02:42:47
by chinmay.sahoo