blah blah blah is here! blah blah » Close

0
votes
0 answers

generics with caching

Hi all, I need your help pls. Pls help me to give the solution/answer for the below question, its urgent. Write a C# code snippet to store information of a list of collection of Authorization objects in a cache. The application may ...

1
votes
2 answers

How can i convert List<customobject> to List<object>?

Hi, i want to convert List<customobject> to List<object>? code i've used is: public class Report { public Report(string strRepId, string strRepName) { strReportId = strRepId; ...

1
votes
1 answers

I want to inherit from List<T>, what will my class look like?

Rick_A
761

I want to inherit from List<T>, and add some properties to the base object. How exactly should I do this? The generics part is confusing me. [code]public class MyClass : List<T> { public string SomeString {get;set;} ...

0
votes
2 answers

Generics in C# - typo in article???

This is in reference to: http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=370 When I try to compile the example below, I get the Error: The type or namespace name 'ItemType' could not be found (are you missing a using d ...

1
votes
2 answers

Why can't you cast to a primitive type like long when its an object?

Rick_A
761

I don't understand why, in c#, I cant' cast an object who's value is an integer to a type long. For example: [code]int x = 4; long y = (long)x; Console.WriteLine("y = " + y); // works Object obj = 4; Console.Wri ...

0
votes
1 answers

C# generic method type query

Hi, I've come across the following code which I am finding it a little hard to get my head around, hope it's not too confusing out of context - [code] protected abstract List<TDataEntity> Read<TDataFilter>(ISelectCommand< ...

Feedback