KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am using LinqPad and in that I was looking at the IL code(compiler optimization switched on) generated for the following Interface & the class that implements the interface: public interface IStockService { [OperationContract] double GetPrice(string ticker); } public class StockService : IStockService { public double GetPrice(string ticker) { return 93.45; } } IL Code : IStockService.GetPrice: StockService.GetPrice: IL_0000: ldc.r8 CD CC CC CC CC 5C 57 40 IL_0009: ret StockService..ctor: IL_0000: ldarg.0 IL_0001: call System.Object..ctor IL_0006: ret Surprisingly I don't see any IL code for the interface. Is this because of the way LinqPad works or the C# compiler treats the interfaces in a different manner?
Tags (comma-separated)
Save Edits
Cancel