No announcements
Found 2716781 threads
-
0 Votes
How to Define method in DataContract class
Just add methods.Answered | 3 Replies | 4990 Views | Created by ronili2 - Sunday, April 3, 2011 7:34 AM | Last reply by E-Jedi - Sunday, April 3, 2011 5:17 PM -
2 Votes
Generic method with where T is List of defined Classes
If that isn't acceptable, the other approach is to just make 4 overloads, and implement this (privately) using a single method without any constraints ...Answered | 2 Replies | 2159 Views | Created by N S S - Monday, July 9, 2012 5:20 PM | Last reply by Wyck - Monday, July 9, 2012 5:29 PM -
1 Votes
How the generic overload method implement?
This is defined in the C# language specification in section 7.5.3 and 7.5.3.6 - Overloading in generic classes.Answered | 2 Replies | 7898 Views | Created by Darren Zeng - Wednesday, June 1, 2011 8:28 AM | Last reply by Min Zhu - Wednesday, June 8, 2011 2:40 AM -
1 Votes
How to define contract for abstract methods?
How can I define a contract for the abstract GetSubscriptions method in the following example, except by introducing an interface and defining the contract on that?Answered | 1 Replies | 4912 Views | Created by Morten Mertner - Friday, April 8, 2011 3:26 PM | Last reply by Alex Rønne Petersen - Saturday, April 9, 2011 10:57 AM -
0 Votes
Passing a user defined method as an argument to a method
You can use the delegate to pass in a function pointer to a method.Answered | 3 Replies | 2880 Views | Created by Potreaux - Thursday, April 22, 2010 9:53 AM | Last reply by HamAndFig - Thursday, April 22, 2010 9:16 PM -
0 Votes
DSL Tools: how to define multiplicity in my generator?
How do i make the generator understand that if the target multiplicity is OneMany or ZeroMany, it has to run my if-statement?Answered | 5 Replies | 3583 Views | Created by aysrun - Tuesday, November 10, 2009 5:20 PM | Last reply by DuncanP - Monday, November 16, 2009 8:56 AM -
3 Votes
Extension method must be defined in a non-generic static class
The problem is you have defined an extension method called StartsWith in Form1 class (see it at the end of the Form1 class).Answered | 8 Replies | 13889 Views | Created by ThomasMSN - Friday, August 12, 2011 9:28 AM | Last reply by Martin_Xie - Wednesday, August 17, 2011 12:01 PM -
0 Votes
How to define a translate method for my own classes?
I learned how to define classes with common interface thanks to this ...Answered | 1 Replies | 1297 Views | Created by waterharbin - Saturday, September 1, 2012 8:09 AM | Last reply by Stefan Hoffmann - Saturday, September 1, 2012 9:54 AM -
0 Votes
user defined class and static methods
To call a static method in a class use something like: SomeClass.SomeMethod(), do the same for static variables.Answered | 3 Replies | 1481 Views | Created by Shadab Hashmi - Wednesday, October 17, 2012 5:58 PM | Last reply by Sambath Raj.C - Wednesday, October 17, 2012 6:48 PM -
4 Votes
Newbie using a generic method
Can you please embellish on what "IOrder defines the SalesOrder property" means?Answered | 5 Replies | 3212 Views | Created by CraigWasHere - Thursday, February 17, 2011 9:04 PM | Last reply by CraigWasHere - Friday, February 18, 2011 4:56 PM -
2 Votes
How to write generic methods in the interface?
Get and Set are verbs which should be only used for explicit getter/setter methods of properties.Answered | 7 Replies | 739 Views | Created by HZ.USA - Thursday, December 17, 2015 12:30 AM | Last reply by Mauricio Feijo - Thursday, December 17, 2015 4:58 PM -
1 Votes
Contracts for Generic Parameters in Abstract Methods
I think what you are looking for is maybe a slightly different handling where instead of strengthening the contracts on implementations of Super<T>, you have Super<T> define an ...Answered | 4 Replies | 4986 Views | Created by Dave Sexton - Monday, October 5, 2009 6:28 AM | Last reply by Dave Sexton - Friday, October 23, 2009 5:24 AM -
1 Votes
Generic method and overload resolution
It prevents making unintended calls to the non-generic method.Answered | 9 Replies | 4313 Views | Created by Louis.fr - Tuesday, June 22, 2010 4:26 PM | Last reply by Louis.fr - Thursday, June 24, 2010 12:46 AM -
1 Votes
Calling methods when using Generics
Usually you add a "constraint" to define this minimal knownledge (such as inheriting from a class or implementing an interface etc...)Answered | 11 Replies | 1265 Views | Created by WarrickFitzs - Friday, February 8, 2013 3:15 PM | Last reply by WarrickFitzs - Monday, February 11, 2013 8:31 PM -
2 Votes
Call generic method with type by name
So we decided to use reflection and i created a helper class to perform all assembly loading, class object creation, invoking static methods, invoking static ...Answered | 7 Replies | 7069 Views | Created by Pedro Moutinho - Wednesday, May 4, 2011 10:05 PM | Last reply by Hemant DotNet - Thursday, May 5, 2011 2:26 PM -
0 Votes
generic methods n00b
If you're using VS 2008 with 3.5, try using the OrderBy method.Answered | 5 Replies | 3044 Views | Created by d_troyer - Thursday, May 21, 2009 3:21 PM | Last reply by Rudedog2 - Thursday, May 21, 2009 7:38 PM -
1 Votes
Generic methods for convering between classes
For example you could write a general method (not generic) that knows that every Domain type has a corresponding DomainModel type and vice versa.Answered | 6 Replies | 1148 Views | Created by Milsnips - Saturday, October 24, 2015 11:26 AM | Last reply by CoolDadTx - Tuesday, October 27, 2015 5:45 PM -
1 Votes
General Method PreprocessQuery
The preprocessquery method on queries is intended for applying additional filtering (by means of where classes) on an entity.Answered | 1 Replies | 754 Views | Created by Kdraper - Thursday, May 16, 2013 1:43 PM | Last reply by Paul Van Bladel - Thursday, May 16, 2013 5:41 PM -
0 Votes
How to use ananomous class with method takes generic class
What if we passed the T type into the generic method or extension method?Answered | 11 Replies | 2821 Views | Created by jdang - Monday, August 10, 2009 3:03 PM | Last reply by Michael Sun [MSFT] - Tuesday, August 11, 2009 7:50 AM -
1 Votes
__declspec (dllexport) generates copy and move special methods
This means that class templates are explicitly instantiated and the class's members must be defined.Answered | 1 Replies | 336 Views | Created by MSDN XY - Tuesday, March 20, 2018 9:48 PM | Last reply by Darran Rowe - Tuesday, March 20, 2018 10:56 PM - Items 1 to 20 of 2716781 Next ›
No announcements