The Artima Developer Community
Sponsored Link

C# Answers Forum
Compile Time Data Type Checking

1 reply on 1 page. Most recent reply: Sep 22, 2003 5:01 PM by Jonathan

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
spaceman spiff

Posts: 1
Nickname: spiff
Registered: Sep, 2003

Compile Time Data Type Checking Posted: Sep 17, 2003 1:49 AM
Reply to this message Reply
Advertisement
Is there a way that I can do Data Type Checking at compile time. I am using object in C#(variant in VB) as a parameter for my methods. What I want to happen is before the parameter enter my methods inside my class is, it has already done Data Type Checking, so my DLL won't produce any i'll behaved. Because some of my methods are hard coded and it can't handle unfamiliar data types.


Jonathan

Posts: 1
Nickname: jamon
Registered: Sep, 2003

Re: Compile Time Data Type Checking Posted: Sep 22, 2003 5:01 PM
Reply to this message Reply
I am not exactly sure what you are up to here :),
but one would normally use a Type or a simple interface as your parameter instead of just Object.
You can work on a set interface so that both will know your methods, then you will have a proper contract.

Flat View: This topic has 1 reply on 1 page
Topic: open a directory Previous Topic   Next Topic Topic: Persistence and Polymorphic Reads

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use