Click here to Skip to main content
15,885,546 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Help..urgent...insert time to database [modified] Pin
Member 44429169-Apr-08 6:45
Member 44429169-Apr-08 6:45 
GeneralRe: Help..urgent...insert time to database Pin
Johan Hakkesteegt9-Apr-08 20:03
Johan Hakkesteegt9-Apr-08 20:03 
QuestionAdd Command Crystal Report not updating parameter Pin
liona9-Apr-08 4:08
liona9-Apr-08 4:08 
Questionhow to operate the code if the text in the textbox change Pin
shee_dee869-Apr-08 3:42
shee_dee869-Apr-08 3:42 
AnswerRe: how to operate the code if the text in the textbox change Pin
Ashish Sehajpal9-Apr-08 4:15
Ashish Sehajpal9-Apr-08 4:15 
GeneralRe: how to operate the code if the text in the textbox change Pin
shee_dee8610-Apr-08 22:52
shee_dee8610-Apr-08 22:52 
QuestionGeneric Methods : Pin
Feras Mazen Taleb9-Apr-08 3:27
Feras Mazen Taleb9-Apr-08 3:27 
GeneralRe: Generic Methods : Pin
Dave Kreskowiak9-Apr-08 6:25
mveDave Kreskowiak9-Apr-08 6:25 
This isn't going to work, and it's completely useless.

You can't do what you want to do using a generic method. You're not constraining your Types to only value types. The addition operator is not defined for all possible types that you're allowing (which is basically everything), so you'll get this error. The problem is that you can't use the Int32, Int64, Byte, yada, yada, yada, value types as contraints because they are all structures, not classes. You can only use classes and interfaces as Type contraints, and only classes that expose a parameterless constructor. Structures do not following this rule, so they can't be used.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




GeneralRe: Generic Methods : Pin
Christian Graus9-Apr-08 11:20
protectorChristian Graus9-Apr-08 11:20 
GeneralRe: Generic Methods : Pin
Dave Kreskowiak9-Apr-08 12:32
mveDave Kreskowiak9-Apr-08 12:32 
GeneralText in form title bar not keeping up (me.text) Pin
Johan Hakkesteegt9-Apr-08 2:19
Johan Hakkesteegt9-Apr-08 2:19 
GeneralRe: Text in form title bar not keeping up (me.text) Pin
ChandraRam9-Apr-08 2:34
ChandraRam9-Apr-08 2:34 
GeneralRe: Text in form title bar not keeping up (me.text) Pin
Johan Hakkesteegt9-Apr-08 3:16
Johan Hakkesteegt9-Apr-08 3:16 
GeneralRe: Text in form title bar not keeping up (me.text) Pin
ChandraRam9-Apr-08 5:43
ChandraRam9-Apr-08 5:43 
GeneralRe: Text in form title bar not keeping up (me.text) Pin
Dave Kreskowiak9-Apr-08 5:48
mveDave Kreskowiak9-Apr-08 5:48 
Generaloptional parameter Pin
helelark1239-Apr-08 1:22
helelark1239-Apr-08 1:22 
GeneralRe: optional parameter Pin
Christian Graus9-Apr-08 2:06
protectorChristian Graus9-Apr-08 2:06 
GeneralRe: optional parameter Pin
helelark1239-Apr-08 2:30
helelark1239-Apr-08 2:30 
GeneralRe: optional parameter Pin
Luc Pattyn9-Apr-08 2:49
sitebuilderLuc Pattyn9-Apr-08 2:49 
GeneralRe: optional parameter Pin
helelark1239-Apr-08 3:00
helelark1239-Apr-08 3:00 
GeneralRe: optional parameter Pin
Dave Kreskowiak9-Apr-08 5:34
mveDave Kreskowiak9-Apr-08 5:34 
GeneralRe: optional parameter Pin
helelark1239-Apr-08 5:48
helelark1239-Apr-08 5:48 
GeneralRe: optional parameter Pin
Dave Kreskowiak9-Apr-08 6:26
mveDave Kreskowiak9-Apr-08 6:26 
GeneralRe: optional parameter Pin
helelark1239-Apr-08 18:42
helelark1239-Apr-08 18:42 
GeneralRe: optional parameter Pin
Dave Kreskowiak10-Apr-08 1:44
mveDave Kreskowiak10-Apr-08 1:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.